Can not execute Checkstyle from sonar

The sonar-checkstyle plugin was installed into my SonarQube instance and I used the set of rules defined in this plugin for my project.
However, when scanning project from sonar maven, it can’t execute.

Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin: (default-cli) on project xxx: Can not execute Checkstyle: cannot initialize module TreeWalker - cannot initialize module JavadocMethod - Property ‘allowMissingJavadoc’ does not exist, please check the documentation -> [Help 1]

Please help me know what is wrong of this.

Thank you so much.

Without using rules into Checkstyle plugin, the flow is executed in normal.


Please report this as an issue on the Checkstyle project. I don’t think the Checkstyle maintainers are monitoring this community.


Hi Nghia
Did you find a solution to this problem?
I did run into the exact same problem and couldn’t find any solution.

Is there any solution for this issue, I met it also.

I have the same problem, someone found a solution? I have another sonar with enterprise license and it doesn’t have the problem, but i need to return to the community edition and that have this error. The two sonar have the same plugins and rules.

Hi there,

i hope my boldness in ninja-commenting will not be noted as too pompous, but i today found this thread because i, too, have had some trouble with a checkstyle-error.

I am using SQ CE 8.6 and just recently added the checkstyle-plugin but never activated any rules from the checkstlye-rules-repository in the quality-profile used!

Nevertheless the scanner failed because some checkstyle-exception. The only way for me to quickly solve this, was to un-install the checkstyle plugin in SQ Server. After that no Checkstyle-Exception happened anymore (kinda obvious, iknow)

So for me the takeaway was “even though i have no checkstyle-rule activated in my used qualityprofile, it nevertheless failed the scanner-analysis-process on the clientside” … i’d agree if someone (looking at you ann :nerd_face:) would suggest that this should probably be handled by the checkstyle-devs :+1:

Yes, I agree that this should be handled by the Checkstyle devs. Looking at you Daniel to raise an issue there (as I advised in August…). :wink:

It’s worth noting that we don’t police how plugins run. As I understand it, they register themselves to be invoked at a certain phase of analysis(?) and we invoke them. It’s up to them to say “oh, I don’t need to run”… or not. A long-standing example of this is the FindBugs plugin, which will run every rule it’s got - whether or not you have any FB rules enabled - and then filter what gets loaded into SonarQube based on your profile.