{"action":"created","issue":{"url":"https://api.github.com/repos/pmayweg/sonar-groovy/issues/70","repository_url":"https://api.github.com/repos/pmayweg/sonar-groovy","labels_url":"https://api.github.com/repos/pmayweg/sonar-groovy/issues/70/labels{/name}","comments_url":"https://api.github.com/repos/pmayweg/sonar-groovy/issues/70/comments","events_url":"https://api.github.com/repos/pmayweg/sonar-groovy/issues/70/events","html_url":"https://github.com/pmayweg/sonar-groovy/issues/70","id":333346119,"node_id":"MDU6SXNzdWUzMzMzNDYxMTk=","number":70,"title":"Cannot use with codenarc gradle plugin (to specify ruleset)","user":{"login":"kdorff","id":757170,"node_id":"MDQ6VXNlcjc1NzE3MA==","avatar_url":"https://avatars0.githubusercontent.com/u/757170?v=4","gravatar_id":"","url":"https://api.github.com/users/kdorff","html_url":"https://github.com/kdorff","followers_url":"https://api.github.com/users/kdorff/followers","following_url":"https://api.github.com/users/kdorff/following{/other_user}","gists_url":"https://api.github.com/users/kdorff/gists{/gist_id}","starred_url":"https://api.github.com/users/kdorff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kdorff/subscriptions","organizations_url":"https://api.github.com/users/kdorff/orgs","repos_url":"https://api.github.com/users/kdorff/repos","events_url":"https://api.github.com/users/kdorff/events{/privacy}","received_events_url":"https://api.github.com/users/kdorff/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-06-18T16:31:33Z","updated_at":"2018-06-19T14:46:58Z","closed_at":null,"author_association":"NONE","body":"I'm hoping to use the sonarqube gradle plugin which, from what I can tell, uses this code to actually perform the heavy lifting. The issue I am having is this plugin's ability to leverage the gradle codenarc plugin (or how to make the pmayweg/sonar-groovy code be more configurable, especially when called from the sonarqube gradle plugin).\r\n\r\nI have created a repo in the \"final state\" including a README.md that provides a simple step-by-step for how I got there. See https://github.com/kdorff/test-sonarqube\r\n\r\nSpecifically, I want to be able to run codenarc on tests as well as source AND be to specify the CodeNarc ruleset that will be used. I am able to run codenarc as expected, and I believe this plugin is seeing my report(s) (at least main.xml, probably not test.xml). I think we are both using the same  codenarc (0.25.2) but this plugin doesn't understand any of the issues in the codenarc report. Output looks like:\r\n\r\n```\r\n$ ./gradlew clean codenarcMain codenarcTest sonarqube\r\n:clean\r\n:codenarcMain\r\nCodeNarc rule violations were found. See the report at: file:///Users/kevi9037/save/IntelliJ/test-sonarqube/build/reports/codenarc/main.xml\r\n:codenarcTest\r\nCodeNarc rule violations were found. See the report at: file:///Users/kevi9037/save/IntelliJ/test-sonarqube/build/reports/codenarc/test.xml\r\n:compileJava NO-SOURCE\r\n:compileGroovy\r\n:buildProperties\r\n:processResources\r\n:classes\r\n:compileTestJava NO-SOURCE\r\n:compileTestGroovy\r\n:processTestResources NO-SOURCE\r\n:testClasses\r\n:test\r\n:sonarqube\r\nNo such rule in SonarQube, so violation from CodeNarc will be ignored: ClassJavadoc\r\nNo such rule in SonarQube, so violation from CodeNarc will be ignored: FileEndsWithoutNewline\r\nNo such rule in SonarQube, so violation from CodeNarc will be ignored: NoDef\r\nNo such rule in SonarQube, so violation from CodeNarc will be ignored: TrailingWhitespace\r\nNo such rule in SonarQube, so violation from CodeNarc will be ignored: TrailingComma\r\nNo such rule in SonarQube, so violation from CodeNarc will be ignored: SpaceAroundMapEntryColon\r\nNo such rule in SonarQube, so violation from CodeNarc will be ignored: UnnecessaryReturnKeyword\r\nNo such rule in SonarQube, so violation from CodeNarc will be ignored: SpaceBeforeOpeningBrace\r\nNo such rule in SonarQube, so violation from CodeNarc will be ignored: UnnecessaryGString\r\nMetric 'lines' is an internal metric computed by SonarQube. Provided value is ignored.\r\nMetric 'test_success_density' is an internal metric computed by SonarQube. Provided value is ignored.\r\n```"},"comment":{"url":"https://api.github.com/repos/pmayweg/sonar-groovy/issues/comments/398426103","html_url":"https://github.com/pmayweg/sonar-groovy/issues/70#issuecomment-398426103","issue_url":"https://api.github.com/repos/pmayweg/sonar-groovy/issues/70","id":398426103,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODQyNjEwMw==","user":{"login":"kdorff","id":757170,"node_id":"MDQ6VXNlcjc1NzE3MA==","avatar_url":"https://avatars0.githubusercontent.com/u/757170?v=4","gravatar_id":"","url":"https://api.github.com/users/kdorff","html_url":"https://github.com/kdorff","followers_url":"https://api.github.com/users/kdorff/followers","following_url":"https://api.github.com/users/kdorff/following{/other_user}","gists_url":"https://api.github.com/users/kdorff/gists{/gist_id}","starred_url":"https://api.github.com/users/kdorff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kdorff/subscriptions","organizations_url":"https://api.github.com/users/kdorff/orgs","repos_url":"https://api.github.com/users/kdorff/repos","events_url":"https://api.github.com/users/kdorff/events{/privacy}","received_events_url":"https://api.github.com/users/kdorff/received_events","type":"User","site_admin":false},"created_at":"2018-06-19T14:46:58Z","updated_at":"2018-06-19T14:46:58Z","author_association":"NONE","body":"I've been diving deeper and it seems that perhaps the issue is that many CodeNarc rules are not included in ```sonar-groovy-plugin/src/main/resources/org/sonar/plugins/groovy/profile-sonar-way.xml``` but they are included in rules.xml and they are listed elsewhere such as Converter.java.\r\n\r\nIt seems that while I get a lot messages such as ```No such rule in SonarQube, so violation from CodeNarc will be ignored: DuplicateStringLiteral```, I did some debugging and yes SOME of the rules are matched such as EmptyMethod, ElseBlockBraces. So rules are matched. BUT, even though I know some rules matched based on the execution, SonarQube doesn't have \"issues\" so the CodeNarc reports aren't ending up in SonarQube.\r\n\r\nAny thoughts on the missing rules or the missing issues?"}}
{"actor":{"display_login":"kdorff"}}