docs for package name check
This commit is contained in:
parent
dfd870600d
commit
8a65d2ff82
|
|
@ -85,6 +85,28 @@ specifies the format for parameter names. The property type is
|
|||
<span class="code">^[a-z][a-zA-Z0-9]*$</span>.</p>
|
||||
|
||||
|
||||
<h2>Format of package names</h2>
|
||||
|
||||
<p>The property <span class="code">checkstyle.pattern.package</span> specifies
|
||||
the format for class and interface names. The property type is
|
||||
<a href="property_types.html#regexp">regular expression</a> and defaults to
|
||||
<span class="code">^[a-z]+(\.[a-zA-Z_][a-zA-Z_0-9]*)*$</span>.</p>
|
||||
|
||||
<div class="tip">
|
||||
<h4 class="tip">Tip</h4>
|
||||
|
||||
<p>
|
||||
The default value of <span class="code">checkstyle.pattern.package</span>
|
||||
has been chosen to match the requirements in the
|
||||
<a href="http://java.sun.com/docs/books/jls/second_edition/html/packages.doc.html#40169">
|
||||
Java Language specification</a> and the Sun coding conventions.
|
||||
However both underscores and uppercase letters are rather uncommon, so most projects
|
||||
should probably use
|
||||
<span class="code">checkstyle.pattern.package=^[a-z]+(\.[a-z][a-z0-9]*)*$</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
<h2>Format of type names</h2>
|
||||
|
||||
<p>The property <span class="code">checkstyle.pattern.type</span> specifies
|
||||
|
|
|
|||
|
|
@ -43,8 +43,9 @@
|
|||
New features:
|
||||
<ul>
|
||||
<li class="body">Major refactoring on the way Checkstyle is configured. It is now completely based around properties. Big thanks to Vincent Massol for the suggestion on how to refactor the ANT task (bug 605141).</li>
|
||||
<li class="body">Check the package name against a pattern (request 597787). Patch provided by Simon Langford.
|
||||
<li class="body">Detect the number of parameters in a declaration exceeding a specified amount (request 582144).</li>
|
||||
<li class="body">Inspired by patch 580410 from Shinya Ohnuma, now the error message are localised.</li>
|
||||
<li class="body">Inspired by patch 580410 from Shinya Ohnuma, now the error messages are localised.</li>
|
||||
<li class="body">Support checking to determine if an unused <span class="code">@throws</span> exception is a subclass of <span class="code">java.lang.Error</span> (request 583719).</li>
|
||||
<li class="body">Incorporate patch 555878 from Rick Giles to allow pattern for local final variables to be specified.</li>
|
||||
<li class="body">Incorporate patch 566855 from Rob Worth to optionally check that parenthesis are padded with spaces.</li>
|
||||
|
|
|
|||
Loading…
Reference in New Issue