javadoc checkscope documentation

This commit is contained in:
lkuehne 2002-01-06 12:50:43 +00:00
parent 7a2e0bf822
commit bec81bd312
3 changed files with 26 additions and 24 deletions

View File

@ -12,13 +12,13 @@
<h2><a name="checkstyle">checkstyle ANT Task</a></h2>
<h3>Description</h3>
<p>This task runs checkstyle over specified Java files. The task has been tested using ANT 1.3. The latest version of checkstyle can be found at <a href="http://www.puppycrawl.com/checkstyle">http://www.puppycrawl.com/checkstyle</a>.
<p>This task runs checkstyle over specified Java files. The task has been tested using ANT 1.4.1. The latest version of checkstyle can be found at <a href="http://checkstyle.sourceforge.net/">http://checkstyle.sourceforge.net/</a>.
This task is included in the checkstyle distribution.</p>
<h3>Installation</h3>
<p>The easiest way is to include <span class="default">checkstyle-all-1.3.jar</span> in the classpath. This contains all the classes required to run checkstyle. Alternatively, you must include the following in the classpath:</p>
<p>The easiest way is to include <span class="default">checkstyle-all-1.4.jar</span> in the classpath. This contains all the classes required to run checkstyle. Alternatively, you must include the following in the classpath:</p>
<ol>
<li><span class="default">checkstyle-1.3.jar</span></li>
<li><span class="default">checkstyle-1.4.jar</span></li>
<li>ANTLR 2.7.1 classes. <span class="default">antlr.jar</span> is included in the distribution.</li>
<li>Jakarta Regexp 1.2 classes. <span class="default">jakarta-regexp-1.2.jar</span> is included in the distribution.</li>
</ol>
@ -125,13 +125,8 @@ This task is included in the checkstyle distribution.</p>
<td align="center" valign="top">No</td>
</tr>
<tr>
<td valign="top">relaxJavadoc</td>
<td valign="top">Specifies whether to relax checking Javadoc comments. Defaults to <span class="default">&quot;false&quot;</span>.</td>
<td align="center" valign="top">No</td>
</tr>
<tr>
<td valign="top">ignoreJavadoc</td>
<td valign="top">Specifies whether to completely ignore checking Javadoc comments. Defaults to <span class="default">&quot;false&quot;</span>.</td>
<td valign="top">javadocScope</td>
<td valign="top">Specifies the visibility scope where javadoc comments are checked. Valid values are <span class="default">&quot;nothing&quot;</span>, <span class="default">&quot;public&quot;</span>, <span class="default">&quot;protected&quot;</span>, <span class="default">&quot;package&quot;</span>, <span class="default">&quot;private&quot;</span> and <span class="default">&quot;anoninner&quot;</span>. Defaults to <span class="default">&quot;private&quot;</span>.</td>
<td align="center" valign="top">No</td>
</tr>
<tr>
@ -161,6 +156,8 @@ This task is included in the checkstyle distribution.</p>
</tr>
</table>
<p>Older versions of the checkstyle task supported the boolean parameters relaxJavadoc and ignoreJavadoc. These parameters have been removed because they were conflicting and the semantics of relaxJavadoc was not clearly specified. The two parameters have been replaced by the javadocScope parameter. Instead of ignoreJavadoc="true" you can now use javadocScope="nothing". The behaviour of relaxJavadoc="true" is roughly the same as javadocScope="protected".</p>
<h3>Examples</h3>
<p><b>Run checkstyle on a single file</b></p>
<pre>

View File

@ -104,12 +104,8 @@ This command line tool is included in the checkstyle distribution.</p>
<td valign="top">Specifies the line in the header to ignore when comparing. Default it to not ignore any line.</td>
</tr>
<tr>
<td valign="top">checkstyle.javadoc.relax</td>
<td valign="top">Specifies whether to relax checking Javadoc comments. Defaults to <span class="default">&quot;no&quot;</span>.</td>
</tr>
<tr>
<td valign="top">checkstyle.javadoc.ignore</td>
<td valign="top">Specifies whether to completely ignore checking Javadoc comments. Defaults to <span class="default">&quot;no&quot;</span>.</td>
<td valign="top">checkstyle.javadoc.scope</td>
<td valign="top">Specifies the visibility scope where javadoc comments are checked. Valid values are <span class="default">&quot;nothing&quot;</span>, <span class="default">&quot;public&quot;</span>, <span class="default">&quot;protected&quot;</span>, <span class="default">&quot;package&quot;</span>, <span class="default">&quot;private&quot;</span> and <span class="default">&quot;anoninner&quot;</span>. Defaults to <span class="default">&quot;private&quot;</span>.</td>
</tr>
<tr>
<td valign="top">checkstyle.ignore.imports</td>
@ -129,6 +125,10 @@ This command line tool is included in the checkstyle distribution.</p>
</tr>
</table>
<p>
Older versions of the checkstyle task supported the boolean parameters checkstyle.javadoc.relax and checkstyle.javadoc.ignore. These parameters have been removed because they were conflicting with each other and the semantics of relaxJavadoc was not specified. The two parameters have been replaced by the checkstyle.javadoc.scope parameter. Instead of checkstyle.javadoc.ignore=true you can now use checkstyle.javadoc.scope=nothing. The behaviour of checkstyle.javadoc.relax=true is roughly the same as checkstyle.javadoc.scope=protected.
</p>
<h3>Examples</h3>
<p><b>Run checkstyle on a file</b></p>
<pre>

View File

@ -54,7 +54,7 @@ div.tip {margin-left : 5%;margin-right : 5%;padding-left: 2%; padding-right: 2%;
<h2>Getting checkstyle</h2>
<p>Binary and source distributions are from <a href="http://checkstyle.sourceforge.net/">http://checkstyle.sourceforge.net/</a>.</p>
<p>Binary and source distributions are available from <a href="http://checkstyle.sourceforge.net/">http://checkstyle.sourceforge.net/</a>.</p>
<p>Source code is stored under CVS at <a href="http://sourceforge.net">SourceForge</a>. The project page is <a href="http://sourceforge.net/projects/checkstyle">http://sourceforge.net/projects/checkstyle</a>.</p>
@ -84,8 +84,13 @@ div.tip {margin-left : 5%;margin-right : 5%;padding-left: 2%; padding-right: 2%;
<li>Command line tool - see <a href="cmdline.html">cmdline.html</a> for more information.</li>
</ul>
<p>I have tested checkstyle using JRE1.2.2 and JRE1.3 on Windows 2000.</p>
<p>Checkstyle has been tested using
<ul>
<li>JRE1.2.2 and JRE1.3 on Windows 2000</li>
<li>JRE1.3.1 on Windows NT 4</li>
<li>JRE1.4beta3 on Red Hat Linux 7.2</li>
</ul>
</p>
<h2>What checkstyle checks</h2>
@ -107,7 +112,7 @@ div.tip {margin-left : 5%;margin-right : 5%;padding-left: 2%; padding-right: 2%;
<p>Javadoc comments for class and interface declarations are checked to ensure that the <span class="code">@author</span> tag exists. This can be turned off.</p>
<p>You can make checkstyle relax the checking for Javadoc comments. When relaxed, checkstyle requires a Javadoc comment for <span class="code">public</span> and <span class="code">protected</span> variables and methods, and for interface and class definitions. You can also completely turn off all checking for Javadoc comments.</p>
<p>You can control the visibility scope where Javadoc comments are checked. For example, you can check Javadoc code only for <span class="code">public</span> and <span class="code">protected</span> variables, methods, interfaces and class definitions. Scoping rules apply, in the above example a public method in a package visible class is not checked. You can also completely turn off all checking for Javadoc comments.</p>
<p>Javadoc comments for methods are checked to ensure that the following tags exist (if required):</p>
<ul>
@ -216,7 +221,7 @@ div.tip {margin-left : 5%;margin-right : 5%;padding-left: 2%; padding-right: 2%;
<ul>
<li>Binary operators are separated from operands by spaces. For example <span class="code">x = y + 1;</span></li>
<li>Unary operators are not separated by spaces. For example <span class="code">x = --y + z++;</span></li>
<li>The keywords <span class="code">if/for/while/do</span> are surrounded by spaces.</li>
<li>The keywords <span class="code">if/for/while/do/catch/synchronized/return</span> are surrounded by spaces.</li>
<li>Casts and commas (',') are followed by white space.
</ul>
@ -275,9 +280,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
</pre>
<h2>Feedback</h2>
<p>If you have any feedback on this tool, please email me at <a href="mailto:checkstyle@puppycrawl.com">checkstyle@puppycrawl.com</a>. I am interested in any improvements you would like to see (or hopefully made!).</p>
<p>Also, send me email if you would like to be notified when a newer version of checkstyle is released.</p>
<p>If you have general feedback (i.e. success stories ;-) on this tool, please send email to <a href="mailto:checkstyle@puppycrawl.com">checkstyle@puppycrawl.com</a>. Please use the SourceForge pages to report <a href="http://sourceforge.net/tracker/?atid=397078&group_id=29721&func=browse">bugs</a> or to submit <a href="http://sourceforge.net/tracker/?atid=397081&group_id=29721&func=browse">feature requests</a>. The developers of checkstyle are interested in any improvements you would like to see (or hopefully made!).</p>
<p>Also, you can subscribe to the <a href="http://lists.sourceforge.net/lists/listinfo/checkstyle-announce">checkstyle-announce</a> mailing list if you would like to be notified when a newer version of checkstyle is released.</p>
<hr>
<p align="center">Copyright &copy; 2001 Oliver Burn. All rights Reserved.</p>