Skip to content

Commit b8bd870

Browse files
committed
Small documentation updates.
Signed-off-by: Manoel Campos <[email protected]>
1 parent 1201532 commit b8bd870

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
![](coverage-report-sample.png)
55

6-
A Doclet to generate JavaDoc coverage reports. It parses the java source files and checks the percentage of the Java code covered by JavaDoc documentation, including:
6+
The Doclet parses java source files and checks the percentage of the Java code covered by JavaDoc documentation, including:
77
- packages (*Java 9 modules not supported yet*)
88
- classes, inner classes, interfaces and enums
99
- class attributes
@@ -158,11 +158,6 @@ task javadocJar(type: Jar, dependsOn: javadocCoverageReport) {
158158
}
159159
```
160160

161-
The example shows how to ignore the package `com.manoelcampos.sample2` from the coverage report. The `<excludePackageNames>` tag accepts a list of packages separated by `:` and also wildcards such as `*`.
162-
For more details, check this [link](https://maven.apache.org/plugins/maven-javadoc-plugin/examples/exclude-package-names.html).
163-
164-
If you are generating the regular JavaDoc HTML files, you have to include this configuration only where the CoverageDoclet is being used into your pom.xml, unless you want these packages to be excluded from the regular JavaDocs too.
165-
166161
# Additional Configuration (optional)
167162

168163
You can define additional configurations for the plugin.
@@ -190,6 +185,11 @@ You can exclude some packages from the coverage report by adding the code exampl
190185
</configuration>
191186
```
192187

188+
The example shows how to ignore the package `com.manoelcampos.sample2` from the coverage report. The `<excludePackageNames>` tag accepts a list of packages separated by `:` and also wildcards such as `*`.
189+
For more details, check this [link](https://maven.apache.org/plugins/maven-javadoc-plugin/examples/exclude-package-names.html).
190+
191+
If you are generating the regular JavaDoc HTML files, you have to include this configuration only where the CoverageDoclet is being used into your pom.xml, unless you want these packages to be excluded from the regular JavaDocs too.
192+
193193
# Building the Doclet from Sources
194194

195195
The Doclet is a Java Maven project which can be built directly from any IDE or using the following maven command:

sample-project/pom.xml

+6
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@
6060
<version>1.2.0</version>
6161
</docletArtifact>
6262
<failOnError>false</failOnError>
63+
64+
<!-- The following configuration is optional.
65+
If an output name isn't given, the report will be
66+
generated as index.html.
67+
-->
68+
<additionalOptions>-outputName "relatorio.html"</additionalOptions>
6369
</configuration>
6470
</execution>
6571
</executions>

src/main/java/com/manoelcampos/javadoc/coverage/Utils.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,13 @@ public final class Utils {
3434
private Utils() {}
3535

3636
/**
37-
* Checks if a element (class, interface, method, etc) is in fact documented or not.
37+
* Checks if an element (package, class, interface, method or constructor) is in fact documented or not.
3838
* Sometimes, there is a javadoc, but the description of the member is empty.
3939
* The javadoc may just contain tags documenting the elements belonging to this member
40-
* (such as method parameters).
40+
* (such as method parameters), but the member itself is not documented.
41+
*
42+
* <p><b>WARNING</b>: This method is not useful to check if a {@code @param}, {@code @return} or {@code @throws} tag
43+
* for a method is documented or not.</p>
4144
*
4245
* @param javadoc the complete JavaDoc for an element.
4346
* @return

src/main/java/com/manoelcampos/javadoc/coverage/stats/MethodTagsDocStats.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ protected ExecutableMemberDoc getDoc() {
8686
* A set of tags doesn't have documentation.
8787
* Only each individual tag may have.
8888
*
89-
* @return
89+
* @return always false
9090
*/
9191
@Override
9292
public boolean isDocumented() {

0 commit comments

Comments
 (0)