jdneo / vscode-checkstyle

Checkstyle extension for VS Code
https://marketplace.visualstudio.com/items?itemName=shengchen.vscode-checkstyle
GNU Lesser General Public License v3.0
69 stars 16 forks source link

Some checkstyle rules are not understood : MissingJavadocMethod, LineLength #339

Closed lpanichi closed 1 year ago

lpanichi commented 1 year ago

I have those errors when importing a checkstyle.xml :

{"message":"cannot initialize module TreeWalker - cannot initialize module MissingJavadocMethod - Unable to instantiate 'MissingJavadocMethod' class, it is also not possible to instantiate it as .MissingJavadocMethod, MissingJavadocMethodCheck, .MissingJavadocMethodCheck. Please recheck that class name is specified as canonical name or read how to configure short name usage https://checkstyle.org/config.html#Packages. Please also recheck that provided ClassLoader to Checker is configured correctly."}
{"message":"LineLength is not allowed as a child in Checker"}

What is the version of checkstyle used compatible with the extension ? I'm using the version 1.4.1 of the extension. VSCode 1.71.0 Java 11

The checkstyle.xml is working with eclipse.

jdneo commented 1 year ago

The checkstyle rules defined in checkstyle.xml can be incompatible across different checkstyle versions.

The extension uses checkstyle@8.18 by default.

You can change that by running the command Checkstyle: Set the Checkstyle Version and select a version which is compatible with your rules.