I get this error while running checkstyle on my custom test configuration - functionalTest.
Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: cannot initialize module TreeWalker - cannot initialize module JavadocMethod - Property 'allowMissingPropertyJavadoc' does not exist, please check the documentation at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:477) at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:198) at com.puppycrawl.tools.checkstyle.ant.CheckstyleAntTask.createRootModule(CheckstyleAntTask.java:412) ... 117 more Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: cannot initialize module JavadocMethod - Property 'allowMissingPropertyJavadoc' does not exist, please check the documentation at com.puppycrawl.tools.checkstyle.TreeWalker.setupChild(TreeWalker.java:136) at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:198) at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:472) ... 119 more Caused by: com.puppycrawl.tools.checkstyle.api.CheckstyleException: Property 'allowMissingPropertyJavadoc' does not exist, please check the documentation at com.puppycrawl.tools.checkstyle.api.AutomaticBean.tryCopyProperty(AutomaticBean.java:223) at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:191) at com.puppycrawl.tools.checkstyle.TreeWalker.setupChild(TreeWalker.java:131) ... 121 more
I see this field is set to true, in checkstyle.xml,
but I still get this error.
plugins { id 'checkstyle' } The plugin adds a number of tasks to the project that perform the quality checks. You can execute the checks by running gradle check. Note that Checkstyle will run with the same Java version used to run Gradle.
The Checkstyle plugin adds the following dependencies to tasks defined by the Java plugin. Depends on: All Checkstyle tasks, including checkstyleMain and checkstyleTest. By default, the Checkstyle plugin expects configuration files to be placed in the root project, but this can be changed.
Example 1. Using the Checkstyle plugin The plugin adds a number of tasks to the project that perform the quality checks. You can execute the checks by running gradle check. Note that Checkstyle will run with the same Java version used to run Gradle. The Checkstyle plugin adds the following tasks to the project:
The HTML report generated by the Checkstyle task can be customized using a XSLT stylesheet, for example to highlight specific errors or change its appearance: Example 3. Customizing the HTML report View a sample Checkstyle stylesheet.
Property 'allowMissingPropertyJavadoc' does not exist
https://checkstyle.org/releasenotes.html#Release_8.25
The property was removed in 8.25 as the functionality was moved to a new check, MissingJavadocMethodCheck
, in 8.20. Since it was moved, the original check just kept the property to not break configuration and be deprecated. It was now removed.
I suggest you add MissingJavadocMethodCheck
to continue the same behavior as before.
for example:
<module name="MissingJavadocMethodCheck">
<property name="allowMissingPropertyJavadoc" value="true"/>
</module>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With