Is there anyway to configure "CommentRequired" rule for Java?

Currently we’re using latest 8.6 Sonarqube Enterprise edition. We starting to configure rules for Java for our projects and receiving many warnings against pmd:CommentRequired rule. Is there any way configure specific subsets for this rule? Such as report if no comments for public constructor, but do not report if no fields comments.
I didn’t see any configuration in the rule except XPATH option.

Hi Dmitry and welcome to the Community!

The rule you refer to is not included in SonarQube. You are probably referring to a rule from the popular PMD plugin? Given that this is a third-party plugin, you will have to contact its authors for support.

Best regards,
Daniel

Yes, you’re right, thanks.
And it seems they even have pr for it: https://github.com/jensgerdes/sonar-pmd/pull/31/files… From 2016…

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.