Scoping for javadoc checks (documentation)
This commit is contained in:
parent
cdf0ac0f4c
commit
b138c559c8
|
|
@ -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 @@
|
|||
<property name="versionFormat" value="\$Revision.*\$"/>
|
||||
</module>
|
||||
</pre>
|
||||
<p class="body">
|
||||
To configure the check for <span
|
||||
class="default">private</span> classes only:
|
||||
</p>
|
||||
<pre class="body">
|
||||
<module name="JavadocType">
|
||||
<property name="scope" value="private"/>
|
||||
<property name="excludescope" value="package"/>
|
||||
</module>
|
||||
</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 @@
|
|||
<module name="JavadocMethod">
|
||||
<property name="scope" value="public"/>
|
||||
<property name="allowUndeclaredRTE" value="true"/>
|
||||
</module>
|
||||
</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">
|
||||
<module name="JavadocMethod">
|
||||
<property name="scope" value="private"/>
|
||||
<property name="excludeScope" value="protected"/>
|
||||
</module>
|
||||
</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">
|
||||
<module name="JavadocVariable">
|
||||
<property name="scope" value="public"/>
|
||||
</module>
|
||||
</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">
|
||||
<module name="JavadocVariable">
|
||||
<property name="scope" value="private"/>
|
||||
<property name="excludeScope" value="protected"/>
|
||||
</module>
|
||||
</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">
|
||||
<module name="JavadocStyle"/>
|
||||
</pre>
|
||||
</pre>
|
||||
|
||||
<p class="body">
|
||||
To configure the check for <span class="default">public</span> scope:
|
||||
</p>
|
||||
</p>
|
||||
|
||||
<pre class="body">
|
||||
<module name="JavadocStyle">
|
||||
<property name="scope" value="public"/>
|
||||
</module>
|
||||
</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">
|
||||
<module name="JavadocStyle">
|
||||
<property name="scope" value="private"/>
|
||||
<property name="excludeScope" value="package"/>
|
||||
</module>
|
||||
</pre>
|
||||
<p class="body">
|
||||
To configure the check to turn off first sentence checking:
|
||||
</p>
|
||||
<pre class="body">
|
||||
</p>
|
||||
<pre class="body">
|
||||
<module name="JavadocStyle">
|
||||
<property name="checkFirstSentence" value="false"/>
|
||||
</module>
|
||||
</pre>
|
||||
</pre>
|
||||
|
||||
<p class="body">
|
||||
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
Loading…
Reference in New Issue