jdneo / vscode-checkstyle

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

How to set checkstyle.fail property to false, so checkstyle plugin doesn't crash #333

Open pitris90 opened 2 years ago

pitris90 commented 2 years ago

Hi, how can I set property checkstyle.fail to false, so plugin won't crash if there are some violations in it? (like it won't even compile, only with "mvn clean install -Dcheckstyle.fail=false" if there are some checkstyle violations. It always crashes in file with violations with this output: {"message":"'com.puppycrawl.tools.checkstyle.api.Violation com.puppycrawl.tools.checkstyle.api.AuditEvent.getViolation()'"}

I want to see what that violations are so I can fix it :D It works in files where there is no violation, but it is pointless then.

jdneo commented 2 years ago

Will the setting java.checkstyle.properties works?

pitris90 commented 2 years ago

Well, I don't know what specific setting i can write there, because I didn't find any property i want to set to write it there. I was checking out this page: https://checkstyle.sourceforge.io/config.html#Content where I didnt find it. So I don't know how to set it, to not get violations and messages about it like this. Can you give me some advice what property I should write there or some other way how to not get violations so it can underline checkstyle errors as expected? 😄

jdneo commented 2 years ago

I guess you need to update your checkstyle rule file according to: https://checkstyle.org/config_filters.html#SeverityMatchFilter_Properties

pitris90 commented 2 years ago

I tried that, but with that module in checkstyle rule file it doesn't underline violations, because it suppresses them. When I change it to suppress only info for example, it still writes same message on output. Maybe it is needed to update your plugin somehow?