diff --git a/docs/config_javadoc.html b/docs/config_javadoc.html index 9e1fca160..754d3561a 100644 --- a/docs/config_javadoc.html +++ b/docs/config_javadoc.html @@ -1,69 +1,172 @@ - - + + +
Checks for Javadoc Comments |
+ ![]() |
+
+
|
+
+
- Checkstyle will check that the following constructs have a Javadoc comment: -
PackageHtmlDescription++ Checks that a package.html file exists for each + package. + -The property checkstyle.javadoc.scope controls -the visibility scope where Javadoc comments are checked. The property type is -scope and defaults to -private. +Example++ To configure the check: + ++<module name="PackageHtml"/> +- For example, you can check Javadoc comments only for public and protected definitions -by setting the property to protected. Scoping -rules apply, so a public method in a package visible -class is not checked. +Package++ com.puppycrawl.tools.checkstyle.checks + +Parent Module++ Checker + +JavadocTypeDescription++ Checks Javadoc comments for class and interface definitions. + -package.html check+Properties-The property checkstyle.require.packagehtml -controls whether to require that a package.html file -exists for each package. The property type is -boolean and defaults to -false. +
Examples++ To configure the default check: + ++<module name="JavadocType"/> ++ + To configure the check for public scope: + ++<module name="JavadocType"> + <property name="scope" value="public"/> +</module> ++ + To configure the check for an @author tag: + ++<module name="JavadocType"> + <property name="authorFormat" value="\S"/> +</module> ++ + To configure the check for a CVS revision version tag: + ++<module name="JavadocType"> + <property name="versionFormat" value="\$Revision.*\$"/> +</module> +- Class/Interface Javadoc checks+Package++ com.puppycrawl.tools.checkstyle.checks + +Parent Module++ TreeWalker + -The property checkstyle.require.version controls -whether to require an @version tag to be defined -for class and interface Javadoc comments. The property type is -boolean and defaults to -false. +JavadocMethodDescription++ Checks to ensure that the following tags exist (if required): + +
The property checkstyle.allow.noauthor controls -whether to allow no @author tag to be defined for -class and interface Javadoc comments. The property type is -boolean and defaults to -false. - - -Method Javadoc checks- -Javadoc comments for methods are checked to ensure that the following tags exist (if required): -
For example the following is valid: -+- The property checkstyle.javadoc.checkUnusedThrows -controls whether to check if an undocumented exception is a subclass of -java.lang.RuntimeException. The property type is -boolean and defaults to -false. ++ This supports the convention in the Sun + Javadoc Guidelines and the "Effective Java" book. + -This supports the convention in -the Sun Javadoc Guidelines -and the "Effective Java" book. +Properties-The classpath may need to be configured to locate the class -information. The classpath configuration is dependent on the mechanism used to -invoke Checkstyle. +
-
+
+
+
+ Tip+Examples++ To configure the default check: + ++<module name="JavadocMethod"/> ++ + To configure the check for public scope and to + check for unused imports: + ++<module name="JavadocMethod"> + <property name="scope" value="public"/> + <property name="checkUnusedThrows" value="true"/> +</module> ++ Notes-It can be extremely painful writing or duplicating Javadoc for a method -required for an interface. Hence checkstyle supports using the convention of -using a single @see tag instead of all the other -tags. For example, if the previous method was implementing a method required -by the com.puppycrawl.tools.checkstyle.Verifier -interface, then the Javadoc could be done as: - -+
Package++ com.puppycrawl.tools.checkstyle.checks + +Parent Module++ TreeWalker + -- Copyright © 2002 Oliver Burn. All rights Reserved. - +JavadocVariableDescription++ Checks that variables have Javadoc comments. + +Properties+ +
Examples++ To configure the default check: + ++<module name="JavadocVariable"/> ++ + To configure the check for public scope: + ++<module name="JavadocVariable"> + <property name="scope" value="public"/> +</module> ++ Package++ com.puppycrawl.tools.checkstyle.checks + +Parent Module++ TreeWalker + + |
+
+ Copyright © 2002 Oliver Burn. All rights Reserved. +
+ +