Closed SRGDamia1 closed 2 years ago
Did you try pointing to the raw rules file here: https://raw.githubusercontent.com/openhab/static-code-analysis/master/sat-plugin/src/main/resources/rulesets/checkstyle/rules.xml there are some other files, so it might not work perfectly.
Yes. It gives errors and won't load the modules:
Module org.openhab.tools.analysis.checkstyle.ParameterizedRegexpHeaderCheck initialization failed. It may be caused by wrong configuraiton or incompatible version.
with further detail:
{"message":"cannot initialize module org.openhab.tools.analysis.checkstyle.ParameterizedRegexpHeaderCheck - Unable to instantiate 'org.openhab.tools.analysis.checkstyle.ParameterizedRegexpHeaderCheck' class, it is also not possible to instantiate it as null. 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."}
I tried pointing cloning and compiling this repo and then pointing it to the generated jar (openhab-codestyle-0.11.0-SNAPSHOT.jar) as a module but it gave the same error.
Try using the checkstyle-0.12.0.jar as module instead. That JAR contains the custom openHAB check classes. The codestyle JAR is only used by the spotless Maven plugin.
Is there any way to get at least the checkstyle portion of the tool to work with the checkstyle extension for VS Code? https://marketplace.visualstudio.com/items?itemName=shengchen.vscode-checkstyle
I can't figure out how to set up the extension so that it can find the modules needed for the custom rules.