Scoping for javadoc checks (documentation)

This commit is contained in:
Oleg Sukhodolsky 2004-03-28 06:32:16 +00:00
parent cdf0ac0f4c
commit b138c559c8
2 changed files with 123 additions and 52 deletions

View File

@ -104,6 +104,12 @@
<td><a href="property_types.html#scope">scope</a></td>
<td><span class="default">private</span></td>
</tr>
<tr>
<td>excludeScope</td>
<td>visibility scope where Javadoc comments are not checked</td>
<td><a href="property_types.html#scope">scope</a></td>
<td><span class="default">null</span></td>
</tr>
<tr>
<td>authorFormat</td>
<td>pattern for @author tag</td>
@ -164,6 +170,16 @@
&lt;property name="versionFormat" value="\$Revision.*\$"/&gt;
&lt;/module&gt;
</pre>
<p class="body">
To configure the check for <span
class="default">private</span> classes only:
</p>
<pre class="body">
&lt;module name="JavadocType"&gt;
&lt;property name="scope" value="private"/&gt;
&lt;property name="excludescope" value="package"/&gt;
&lt;/module&gt;
</pre>
<h4>Package</h4>
<p class="body">
@ -230,6 +246,12 @@
<td><a href="property_types.html#scope">scope</a></td>
<td><span class="default">private</span></td>
</tr>
<tr>
<td>excludeScope</td>
<td>visibility scope where Javadoc comments are not checked</td>
<td><a href="property_types.html#scope">scope</a></td>
<td><span class="default">null</span></td>
</tr>
<tr>
<td>allowUndeclaredRTE</td>
<td>whether to allow documented exceptions that
@ -242,14 +264,14 @@
<td>allowThrowsTagsForSubclasses</td>
<td>whether to allow documented exceptions that
are subclass of one of declared exception.</td>
<td><a href="property_types.html#scope">boolean</a></td>
<td><a href="property_types.html#boolean">boolean</a></td>
<td><span class="default">false</span></td>
</tr>
<tr>
<td>allowMissingParamTags</td>
<td>whether to ignore errors when a method has parameters
but does not have matching param tags in the javadoc.</td>
<td><a href="property_types.html#scope">boolean</a></td>
<td><a href="property_types.html#boolean">boolean</a></td>
<td><span class="default">false</span></td>
</tr>
<tr>
@ -257,14 +279,14 @@
<td>whether to ignore errors when a method declares
that it throws exceptions but does have matching throws tags
in the javadoc.</td>
<td><a href="property_types.html#scope">boolean</a></td>
<td><a href="property_types.html#boolean">boolean</a></td>
<td><span class="default">false</span></td>
</tr>
<tr>
<td>allowMissingReturnTag</td>
<td>whether to ignore errors when a method returns
non-void type does have a return tag in the javadoc.</td>
<td><a href="property_types.html#scope">boolean</a></td>
<td><a href="property_types.html#boolean">boolean</a></td>
<td><span class="default">false</span></td>
</tr>
<tr>
@ -299,6 +321,17 @@
&lt;module name="JavadocMethod"&gt;
&lt;property name="scope" value="public"/&gt;
&lt;property name="allowUndeclaredRTE" value="true"/&gt;
&lt;/module&gt;
</pre>
<p class="body">
To configure the check for methods which are in <span
class="default">private</span> , but not in <span
class="default">protected</span> scope:
</p>
<pre class="body">
&lt;module name="JavadocMethod"&gt;
&lt;property name="scope" value="private"/&gt;
&lt;property name="excludeScope" value="protected"/&gt;
&lt;/module&gt;
</pre>
<h4>Notes</h4>
@ -363,6 +396,12 @@ convention of using a
<td><a href="property_types.html#scope">scope</a></td>
<td><span class="default">private</span></td>
</tr>
<tr>
<td>excludeScope</td>
<td>visibility scope where Javadoc comments are not checked</td>
<td><a href="property_types.html#scope">scope</a></td>
<td><span class="default">null</span></td>
</tr>
</table>
<h4>Examples</h4>
@ -378,6 +417,17 @@ convention of using a
<pre class="body">
&lt;module name="JavadocVariable"&gt;
&lt;property name="scope" value="public"/&gt;
&lt;/module&gt;
</pre>
<p class="body">
To configure the check for members which are in <span
class="default">private</span>, but not in <span
class="default">protected</span> scope:
</p>
<pre class="body">
&lt;module name="JavadocVariable"&gt;
&lt;property name="scope" value="private"/&gt;
&lt;property name="excludeScope" value="protected"/&gt;
&lt;/module&gt;
</pre>
<h4>Package</h4>
@ -436,76 +486,93 @@ convention of using a
<td>scope</td>
<td>visibility scope where Javadoc comments are checked</td>
<td><a href="property_types.html#scope">scope</a></td>
<td><span class="default">private</span></td>
</tr>
<tr>
<td>checkFirstSentence</td>
<td>Whether to check the first sentence for proper end of sentence.</td>
<td><a href="property_types.html#boolean">boolean</a></td>
<td><span class="default">true</span></td>
</tr>
<tr>
<td>checkEmptyJavadoc</td>
<td>Whether to check if the Javadoc is missing a describing text.</td>
<td><a href="property_types.html#boolean">boolean</a></td>
<td><span class="default">false</span></td>
</tr>
<tr>
<td>checkHtml</td>
<td>Whether to check for incomplete html tags.</td>
<td><a href="property_types.html#boolean">boolean</a></td>
<td><span class="default">true</span></td>
</tr>
<tr>
<td>tokens</td>
<td>definitions to check</td>
<td>subset of tokens
<a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INTERFACE_DEF">INTERFACE_DEF</a>,
<a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CLASS_DEF">CLASS_DEF</a>,
<a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>,
<a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">CTOR_DEF</a>,
<a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF">VARIABLE_DEF</a>
</td>
<td>
<a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INTERFACE_DEF">INTERFACE_DEF</a>,
<a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CLASS_DEF">CLASS_DEF</a>,
<a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>,
<a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">CTOR_DEF</a>,
<a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF">VARIABLE_DEF</a>
</td>
</tr>
</table>
<td><span class="default">private</span></td>
</tr>
<tr>
<td>excludeScope</td>
<td>visibility scope where Javadoc comments are not checked</td>
<td><a href="property_types.html#scope">scope</a></td>
<td><span class="default">null</span></td>
</tr>
<tr>
<td>checkFirstSentence</td>
<td>Whether to check the first sentence for proper end of sentence.</td>
<td><a href="property_types.html#boolean">boolean</a></td>
<td><span class="default">true</span></td>
</tr>
<tr>
<td>checkEmptyJavadoc</td>
<td>Whether to check if the Javadoc is missing a describing text.</td>
<td><a href="property_types.html#boolean">boolean</a></td>
<td><span class="default">false</span></td>
</tr>
<tr>
<td>checkHtml</td>
<td>Whether to check for incomplete html tags.</td>
<td><a href="property_types.html#boolean">boolean</a></td>
<td><span class="default">true</span></td>
</tr>
<tr>
<td>tokens</td>
<td>definitions to check</td>
<td>subset of tokens
<a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INTERFACE_DEF">INTERFACE_DEF</a>,
<a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CLASS_DEF">CLASS_DEF</a>,
<a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>,
<a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">CTOR_DEF</a>,
<a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF">VARIABLE_DEF</a>
</td>
<td>
<a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#INTERFACE_DEF">INTERFACE_DEF</a>,
<a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CLASS_DEF">CLASS_DEF</a>,
<a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#METHOD_DEF">METHOD_DEF</a>,
<a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#CTOR_DEF">CTOR_DEF</a>,
<a href="api/com/puppycrawl/tools/checkstyle/api/TokenTypes.html#VARIABLE_DEF">VARIABLE_DEF</a>
</td>
</tr>
</table>
<h4>Examples</h4>
<p class="body">
To configure the default check:
</p>
</p>
<pre class="body">
&lt;module name="JavadocStyle"/&gt;
</pre>
</pre>
<p class="body">
To configure the check for <span class="default">public</span> scope:
</p>
</p>
<pre class="body">
&lt;module name="JavadocStyle"&gt;
&lt;property name="scope" value="public"/&gt;
&lt;/module&gt;
</pre>
</pre>
<p class="body">
To configure the check for javadoc which is in <span
class="default">private</span>, but not in <span
class="default">package</span> scope:
</p>
<pre class="body">
&lt;module name="JavadocStyle"&gt;
&lt;property name="scope" value="private"/&gt;
&lt;property name="excludeScope" value="package"/&gt;
&lt;/module&gt;
</pre>
<p class="body">
To configure the check to turn off first sentence checking:
</p>
<pre class="body">
</p>
<pre class="body">
&lt;module name="JavadocStyle"&gt;
&lt;property name="checkFirstSentence" value="false"/&gt;
&lt;/module&gt;
</pre>
</pre>
<p class="body">

View File

@ -154,6 +154,10 @@
<li class="body">Added ignoreNonLocal property to UnusedParameter
check to check only private and static methods (request 787683)</li>
<li class="body">Added excludeScope property to
Javadoc(Method|Bariable|Type|Style) checks (request
846108)</li>
</ul>
<p class="body">