SonarQube 5.1 Adding Custom Rule for java

1.2k views Asked by At

I have implemented Sonar Java Plug-in(Maven) following the example here : https://github.com/SonarSource/sonar-examples/tree/master/plugins/java-custom-rules. Copied the generated sonar-plugin in /extensions/plugins directory. Restarted the SonarQube server and ran the analysis using the mvn sonar:sonar.

I can see the new Rules being added in Rules tab but no issues are being logged and also the status of Rule is active. Looks like the Rules are not considered at the time of analysis. Is there anything i am missing?

1

There are 1 answers

2
Mithfindel On BEST ANSWER

You have to enable your new rules on a quality profile.