Sonar scanner is not scanning the custom rules

I am using sonarqube-7.3 version. I followed the below link of writing custom rules in java
https://docs.sonarqube.org/display/PLUG/Writing+Custom+Java+Rules+101
I could able to see the rules through web interface.When I run the sonar scanner(4.0.0.1744) against the project which is having issue as per my rules, but it is not reporting the issues through web interface.

I am using sonar-java-plugin-3.13.1.jar

I am having below properties in my sonar-project.properties file

Sonar.projectKey
Sonar.projectName
Sonar.sourceEncoding
Sonar.sources
Sonar.java.binaries
Sonar.java.libraries

Could you please help me in resolving this issue

It would be more appreciable if you extend your help

Hi,

Have you made sure your custom rule is included in the profile that’s used during analysis?

 
Ann

Yea.It is included in the profile

Hi,

There can be several things wrong going on here so it will be very hard if not impossible to help you out.

It might be that your rule is not triggered because it is not activated (as suggested by Ann). I could be that while it is activated, you may have a bug that prevents it to be run or to raise an issue. It can be that the rule is not properly registered and thus not running. etc…

Please share a bit more details in order for us to be able to help you out. Code of the rule, its unit test. Did you try to just add a log to see if the rule is properly triggered ?

Hope that helps.