Custom rules with Sonar plugin

Looking at the documentation, there is limited options for custom rules using XPath rules and most of the languages support the creation via plugins

This is the first time I try to customise my own plugin in order to add custom rules and I wanted to know if there are recommendations on how to approach it.

  • When adding a plugin with custom rules, do the rules directly appear in the rules and quality profile section?
  • Are there specific naming conventions that should be followed when it comes to adding rules?
  • If we are potentially going to have several custom rules required by different teams, should we capture all of them under the same plugin?
    Thanks!!!

Hi,

There’s a tutorial for writing rules for Java:

 
HTH,
Ann

1 Like

That’s pretty handy information. Thanks!

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