sonar-groovy icon indicating copy to clipboard operation
sonar-groovy copied to clipboard

Scanner does not populate Codenarc Rules

Open DavidZiemann opened this issue 5 years ago • 2 comments

I am currently setting up SonarQube for a Grails 3 application and have everything up and running except for displaying the Codenarc rules. I have installed the groovy plugin for SonarQube and it is linked to the correct file for reporting the Codenarc results. Additionally, I added all the additional rules it notified me in the scan so I know they are being analyzed. I am currently getting 0 bugs, vulnerabilities, or code smells. Below you can see the logs when I use sonar-scanner -X.

DEBUG: Sensors : CodeNarc -> GroovySensor -> GroovySurefireSensor -> Groovy CoberturaSensor -> Groovy JaCoCo Coverage -> JavaXmlSensor -> SonarCSS Rules -> HTML -> XML Sensor
INFO: Sensor CodeNarc [groovy]
INFO: Sensor CodeNarc [groovy] (done) | time=402ms
INFO: Sensor GroovySensor [groovy]
INFO: Load project repositories

Is there a way to further debug why the codenarc results are not displaying?

Screenshots

Rulesets

image

Repo Overview

image

Codenarc Report

image

Installed Versions

Grails - 3.3.9

SonarQube - 8.2.0.32929 (Docker) Scanner - 4.3.0.2102

Plugins:

  • Cobertura - 2.0
  • Git - 1.11 (build 11)
  • Groovy - 1.6
  • Java Code Quality and Security - 6.3 (build 21585)
  • SonarCSS - 1.2 (build 1325)
  • SonarHTML - 3.2 (build 2082)
  • SonarJS - 6.2.1 (build 12157)
  • SonarTS - 2.1 (build 4359)
  • SonarXML - 2.0.1 (build 2020)
  • Svn - 1.9.0.1295

DavidZiemann avatar Apr 23 '20 15:04 DavidZiemann

I have also tried SonarQube 7.9 to confirm it was not a version issue and I am running into the same results. I pulled the source code and I am building it locally to identify the issue. From my initial debugging, it looks like the report files are not being generated. I will provide exact information as soon as I identify the exact issue.

DavidZiemann avatar Apr 23 '20 16:04 DavidZiemann

I never used the feature to import external CodeNarc reports... Does it work without the external report and letting Sonar-Groovy use its integrated CodeNarc copy?

TobiX avatar May 11 '21 18:05 TobiX