I have upgraded the maven-checkstyle-plugin from 2.17 to 3.1.1 and when running mvn checkstyle:checkstyle I have encountered numerous runtime errors such as (and the hard part was the errors would show 1 at a time - meaning you fix the 1st error then the 2nd error shows...):
1. Failed during checkstyle configuration: cannot initialize module TreeWalker - Unable to instantiate 'FileContentsHolder' class,
2. cannot initialize module TreeWalker - TreeWalker is not allowed as a parent of LineLength Please review 'Parent Module' section for this Check in web documentation if Check is standard.
3. SuppressionCommentFilter is not allowed as a child in Checker
This is because of the version upgrade from 6.* to 8.* upon upgrading to the latest plugin version.
I tried to find some validator that would tell me that the XML is no longer valid however I cannot find any, is there any such tool?
You need to modify your xml config. This is due to several breaking compatibility changes.
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