I do not understand. I followed the tutorial from here https://github.com/SonarSource/sonar-java/blob/master/docs/CUSTOM_RULES_101.md.
I followed the whole tutorial to the letter and when I see if the rule created via the tutorial is taken into account well, not at all … however, it is well in sonarQube,
I added the “java-custom-rules-1.0-SNAPSHOT.jar” file as indicated in the tutorial, I created a java project with the error in it, I added the project in the analyzes sonarQube, I have the function with the error which is displayed in the “code” tab of the project, I have created a “quality profile” with the active rule inside …
I think I did everything but it doesn’t work … Can someone help me, please? I am tired…
Since you admit you’re tired, I’m going to start with the silly question. You’ve created a profile. Is that the profile that was used during analysis? You can tell by expanding the project’s “Project Information” slide-out. E.G.:
You’ve found the wrong SonarSourcer to message in french.
Your first screenshot (Project Information) makes it pretty clear that your custom rules profile is not assigned to the project – or at least, there’s been no fresh analysis since you assigned the Quality Profile to that project.
Have you assigned that project to your custom quality profile and have you reanalyzed the project since doing so? You should see your custom quality profile name pop up in the project information drawer when you’ve done everything correctly.
in my console
[WARNING] SCM provider autodetection failed. Please use “sonar.scm.provider” to define SCM of your project, or disable the SCM Sensor in the project settings.