New rule with the rule the AInsufficientCommentDensity

Is it possible to customize a rule in SonarQube ?
I present my problem.
I would like to apply the rule ( AInsufficientCommentDensity : Source files should have a sufficient density of comment lines) only for files wich have more than N line of code.
I think that this rule can not to customize so I have to write a new rule but I don’t know hoxw to do that.
Someone can help me ?

Hi Frederic,

You will indeed have to implement your own version of the rule to get this functionality. Feel free to take a look at our open source repos to get an idea of how to get started and when you have specific development questions you can open new threads in this category.


Hi Ann
Thanks for your reply. Can you tell me where i can find your open source ?


Take a look at