You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes, developers write useless javadocs such as the example below
/** * Some Foo Method. * @param id the id * @return */intsomeFooMethod(intid){ return0; }
The plugin should spot this kind of "documentation" and present them into the report.
A common pattern to detect such useless javadocs are:
the method documentation includes only the name of the method, accordingly separating words by space
param documentation just includes the name or type of the param, preceded by an article (the, a, an): the id, an id, an int
method or param documentation includes just one word.
after removing connectors (the, a, and, of, to, for, etc) and spaces from the documentation, the text remaining is equal to the element name, for instance:
/** * Compute the statistics.*/doublecomputeStatistics(){ return0; }
However, it may be difficult to detect verbs in the 3rd person of the singular, such as "Computes" instead of "Compute".
Regular expressions should be defined to detect such issues. A set of regex should be defined by default, but the plugin should enable developers to specify their own regex and if they want to use both the given regular expressions and the standard ones, or just the given ones.
The text was updated successfully, but these errors were encountered:
Sometimes, developers write useless javadocs such as the example below
The plugin should spot this kind of "documentation" and present them into the report.
A common pattern to detect such useless javadocs are:
However, it may be difficult to detect verbs in the 3rd person of the singular, such as "Computes" instead of "Compute".
Regular expressions should be defined to detect such issues. A set of regex should be defined by default, but the plugin should enable developers to specify their own regex and if they want to use both the given regular expressions and the standard ones, or just the given ones.
The text was updated successfully, but these errors were encountered: