New checkstyle rules doesn't show on Sonar issues list

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    SonarQube version 8.5.1
  • what are you trying to achieve
    I have several custom checkstyle checks that extends from com.puppycrawl.tools.checkstyle.api.AbstractCheck, I want to upload the violations that belongs to my custom checkstyle checks to SonarQube server.
  • what have you tried so far to achieve this
    I have several custom checkstyle checks that extends from com.puppycrawl.tools.checkstyle.api.AbstractCheck, I ran the mvn checkstyle:checkstyle command
    and get the checkstyle report (checkstyle-result.xml) which contains a lot of violations, some of them belongs to my custom checkstyle checks. I upload the test result by command mvn sonar:sonar -Dsonar.java.checkstyle.reportPaths=target/checkstyle-result.xml …. On the SonarQube website, I can see violations that belong to checkstyle built-in checks, but I can’t see violations that belong to my custom checkstyle checks. For example, I got a violation in checkstyle-result.xml, but even I upload the test result, I can’t see this violation on SonarQube server.

Hello @zjqzfyc

From the code of the importer, I can say that the source attribute should start with com.puppycrawl.tools.checkstyle.checks. and that the message attribute should not be empty. If it is not the case, the issue will not be imported and you should see a line in the debug logs of the analysis.
It it possible to make this happen on your side? If not, could you share the report you are talking about? Or a sample, containing both a violation correctly imported and one not.