Create custom rules in Sonar Plugin


I want to create custom rules in my custom plugin. I want to define those rules when scanning a project.

Could you please let me know is there any way to do this?

I am using sonarqube 7.9.3 LTS

Thank You

Hello @unb,

You are probably looking for this part of the documentation.

In case you need additional information, it would also help if you could mention the language you are targetting.


Hi @Quentin

Thank you for your quick reply.
I will explain my question with more information.

I have a class called “TestSonar” that is implemented by the “RulesDefinition” interface. also, I set a property using PropertyDefinition.builder and it called “testProperty”.

So I want to get this property value(testProperty) in my TestSonar class

Could you please let me know how to do that?

Thank you