updated for the IgnoreBraces property
This commit is contained in:
parent
be6d271ac3
commit
b06dd9801e
|
|
@ -1,5 +1,14 @@
|
|||
2001-07-02 Oliver Burn <oliver-work@puppycrawl.com>
|
||||
|
||||
* docs/index.html: Added that can ignore checking braces.
|
||||
|
||||
* docs/cmdline.html: Added docs for IgnoreBraces property.
|
||||
|
||||
* docs/anttask.html: Added docs for IgnoreBraces property.
|
||||
|
||||
* src/checkstyle/com/puppycrawl/tools/checkstyle/CheckStyleTask.java:
|
||||
Added support for the IgnoreBraces property.
|
||||
|
||||
* src/checkstyle/com/puppycrawl/tools/checkstyle/VerifierImpl.java:
|
||||
Added support for the IgnoreBraces property.
|
||||
|
||||
|
|
|
|||
|
|
@ -107,7 +107,9 @@
|
|||
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
|
||||
<classpath refid="run.classpath"/>
|
||||
</taskdef>
|
||||
<checkstyle headerfile="docs/java.header" headerignoreline="3">
|
||||
<checkstyle headerfile="docs/java.header"
|
||||
ignorebraces="false"
|
||||
headerignoreline="3">
|
||||
<fileset dir="src/checkstyle"
|
||||
includes="**/*.java"
|
||||
excludes="**/Generated*.java"/>
|
||||
|
|
|
|||
|
|
@ -44,17 +44,17 @@ This task is included in the checkstyle distribution.</p>
|
|||
</tr>
|
||||
<tr>
|
||||
<td valign="top">allowtabs</td>
|
||||
<td valign="top">Indicates whether to allow tabs. Defaults to <span class="default">"no"</span>.</td>
|
||||
<td valign="top">Indicates whether to allow tabs. Defaults to <span class="default">"false"</span>.</td>
|
||||
<td align="center" valign="top">No</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">allowprotected</td>
|
||||
<td valign="top">Indicates whether to allow protected data. Defaults to <span class="default">"no"</span>.</td>
|
||||
<td valign="top">Indicates whether to allow protected data. Defaults to <span class="default">"false"</span>.</td>
|
||||
<td align="center" valign="top">No</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">allownoauthor</td>
|
||||
<td valign="top">Indicates whether to allow no <span class="default">@author</span> tag to be defined for class and interface Javadoc comments. Defaults to <span class="default">"no"</span>.</td>
|
||||
<td valign="top">Indicates whether to allow no <span class="default">@author</span> tag to be defined for class and interface Javadoc comments. Defaults to <span class="default">"false"</span>.</td>
|
||||
<td align="center" valign="top">No</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
|
@ -99,17 +99,22 @@ This task is included in the checkstyle distribution.</p>
|
|||
</tr>
|
||||
<tr>
|
||||
<td valign="top">relaxjavadoc</td>
|
||||
<td valign="top">Specifies whether to relax checking Javadoc comments. Defaults to <span class="default">"no"</span>.</td>
|
||||
<td valign="top">Specifies whether to relax checking Javadoc comments. Defaults to <span class="default">"false"</span>.</td>
|
||||
<td align="center" valign="top">No</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">ignoreimports</td>
|
||||
<td valign="top">Specifies whether to ignore checking import statements. Defaults to <span class="default">"no"</span>.</td>
|
||||
<td valign="top">Specifies whether to ignore checking import statements. Defaults to <span class="default">"false"</span>.</td>
|
||||
<td align="center" valign="top">No</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">ignorewhitespace</td>
|
||||
<td valign="top">Specifies whether to ignore checking whitespace. Defaults to <span class="default">"no"</span>.</td>
|
||||
<td valign="top">Specifies whether to ignore checking whitespace. Defaults to <span class="default">"false"</span>.</td>
|
||||
<td align="center" valign="top">No</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">ignorebraces</td>
|
||||
<td valign="top">Specifies whether to ignore checking braces. Defaults to <span class="default">"false"</span>.</td>
|
||||
<td align="center" valign="top">No</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -95,6 +95,10 @@ This command line tool is included in the checkstyle distribution.</p>
|
|||
<td valign="top">checkstyle.ignore.whitespace</td>
|
||||
<td valign="top">Specifies whether to ignore checking whitespace. Defaults to <span class="default">"no"</span>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top">checkstyle.ignore.braces</td>
|
||||
<td valign="top">Specifies whether to ignore checking braces. Defaults to <span class="default">"no"</span>.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h3>Examples</h3>
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ div.tip {margin-left : 5%;margin-right : 5%;padding-left: 2%; padding-right: 2%;
|
|||
<li>Format of parameter names match a specified regular expression.</li>
|
||||
<li>Variables that are not declared as <span class="code">private</span> or <span class="code">protected</span>.</li>
|
||||
<li>Correct use of white space around binary and unary operators. For example, <span class="code">x -=- 1;</span> is illegal, whereas <span class="code">x -= -1;</span> is not. Note: these checks can be turned off.</li>
|
||||
<li>Ensure <span class="code">{}</span>'s are used for <span class="code">if/while/for/do</span> constructs.</li>
|
||||
<li>Ensure <span class="code">{}</span>'s are used for <span class="code">if/while/for/do</span> constructs. Note: this check can be turned off.</li>
|
||||
<li>Lines are not longer than a specified length.</li>
|
||||
<li>Lines do not contain tabs. Note: this check can be turned off.</li>
|
||||
</ul>
|
||||
|
|
@ -203,6 +203,9 @@ div.tip {margin-left : 5%;margin-right : 5%;padding-left: 2%; padding-right: 2%;
|
|||
<li><span class="code">do/while</span></li>
|
||||
</ul>
|
||||
|
||||
<p>This feature can be turned off.</p>
|
||||
|
||||
|
||||
<h3><a name="File Header">File Header</a></h3>
|
||||
<p>Ensure that the file starts with a specified header. The header contents are specified in a file. If no file is specified, checkstyle does not check for a header.</p>
|
||||
|
||||
|
|
|
|||
|
|
@ -64,31 +64,31 @@ public class CheckStyleTask
|
|||
}
|
||||
|
||||
/** @param aAllowed whether tabs are allowed **/
|
||||
public void setAllowtabs(boolean aAllowed)
|
||||
public void setAllowTabs(boolean aAllowed)
|
||||
{
|
||||
mConfig.setAllowTabs(aAllowed);
|
||||
}
|
||||
|
||||
/** @param aAllowed whether protected data is allowed **/
|
||||
public void setAllowprotected(boolean aAllowed)
|
||||
public void setAllowProtected(boolean aAllowed)
|
||||
{
|
||||
mConfig.setAllowProtected(aAllowed);
|
||||
}
|
||||
|
||||
/** @param aAllowed whether allow having no author **/
|
||||
public void setAllownoauthor(boolean aAllowed)
|
||||
public void setAllowNoAuthor(boolean aAllowed)
|
||||
{
|
||||
mConfig.setAllowNoAuthor(aAllowed);
|
||||
}
|
||||
|
||||
/** @param aLen max allowed line length **/
|
||||
public void setMaxlinelen(int aLen)
|
||||
public void setMaxLineLen(int aLen)
|
||||
{
|
||||
mConfig.setMaxLineLength(aLen);
|
||||
}
|
||||
|
||||
/** @param aPat pattern for member variables **/
|
||||
public void setMemberpattern(String aPat)
|
||||
public void setMemberPattern(String aPat)
|
||||
{
|
||||
try {
|
||||
mConfig.setMemberPat(aPat);
|
||||
|
|
@ -100,7 +100,7 @@ public class CheckStyleTask
|
|||
}
|
||||
|
||||
/** @param aPat pattern for parameters **/
|
||||
public void setParampattern(String aPat)
|
||||
public void setParamPattern(String aPat)
|
||||
{
|
||||
try {
|
||||
mConfig.setParamPat(aPat);
|
||||
|
|
@ -112,7 +112,7 @@ public class CheckStyleTask
|
|||
}
|
||||
|
||||
/** @param aPat pattern for constant variables **/
|
||||
public void setConstpattern(String aPat)
|
||||
public void setConstPattern(String aPat)
|
||||
{
|
||||
try {
|
||||
mConfig.setStaticFinalPat(aPat);
|
||||
|
|
@ -124,7 +124,7 @@ public class CheckStyleTask
|
|||
}
|
||||
|
||||
/** @param aPat pattern for static variables **/
|
||||
public void setStaticpattern(String aPat)
|
||||
public void setStaticPattern(String aPat)
|
||||
{
|
||||
try {
|
||||
mConfig.setStaticPat(aPat);
|
||||
|
|
@ -136,7 +136,7 @@ public class CheckStyleTask
|
|||
}
|
||||
|
||||
/** @param aPat pattern for type names **/
|
||||
public void setTypepattern(String aPat)
|
||||
public void setTypePattern(String aPat)
|
||||
{
|
||||
try {
|
||||
mConfig.setTypePat(aPat);
|
||||
|
|
@ -148,7 +148,7 @@ public class CheckStyleTask
|
|||
}
|
||||
|
||||
/** @param aName header file name **/
|
||||
public void setHeaderfile(File aName)
|
||||
public void setHeaderFile(File aName)
|
||||
{
|
||||
try {
|
||||
mConfig.setHeaderFile(aName.getAbsolutePath());
|
||||
|
|
@ -160,7 +160,7 @@ public class CheckStyleTask
|
|||
}
|
||||
|
||||
/** @param aNum **/
|
||||
public void setHeaderignoreline(int aNum)
|
||||
public void setHeaderIgnoreLine(int aNum)
|
||||
{
|
||||
mConfig.setHeaderIgnoreLineNo(aNum);
|
||||
}
|
||||
|
|
@ -183,6 +183,12 @@ public class CheckStyleTask
|
|||
mConfig.setIgnoreWhitespace(aIgnore);
|
||||
}
|
||||
|
||||
/** @param aIgnore whether to ignore braces **/
|
||||
public void setIgnoreBraces(boolean aIgnore)
|
||||
{
|
||||
mConfig.setIgnoreBraces(aIgnore);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
// The doers
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
Loading…
Reference in New Issue