chrismair / GrailsCodeNarcPlugin

Grails CodeNarc plugin
Apache License 2.0
10 stars 5 forks source link

Sonar runner ignore issues from Codenarc report #5

Open gitmilek opened 9 years ago

gitmilek commented 9 years ago

Hello,

After upgrading to Sonar 4.5.1 from 3.7.4 it stopped correctly reading CodeNarc report. I checked that when I remove from the generated report every "grails-app/domain/", "grails-app/services/" etc. from path attributes, it will work correctly. Below I attached the links where this problem is described but without any solution. http://stackoverflow.com/questions/27614985/sonar-runner-codenarc-sensor-ignore-violation-from-codenarc http://sonarqube.15.x6.nabble.com/No-Issues-and-code-coverage-for-groovy-in-multi-language-project-with-SonarQube-4-2-td5023761.html#a5023813

I want to ask if you know something about that? Or maybe you know if there is a way to generate CodeNarc report but without these "grails-app/domain/", "grails-app/services/" etc. parts in path?

Thanks in advance for your answer.

chrismair commented 9 years ago

Hmmm, no I was not aware of this issue.

Do you know what version of CodeNarc it was using back with Sonar 3.7.4 when it worked? (It should show the CodeNarc version on the old report)

I don't know of a way to automatically generate the CodeNarc report without those path prefixes.

gitmilek commented 9 years ago

Yes I know - it was codenarc 0.21. I also checked right now codenarc grails plugin in version 0.22 and in Sonar 3.7.4 issues widget worked fine but in Sonar 4.5.1 it didn't and in logs, for files where violation occured there are warnings with "Resource is not indexed. Ignoring violation...".