Reputation: 1389
I have a multi-module Gradle java-based project. I have a Sonar server configured with a host of rules. I have tried to integrate Sonar rules into the project in the three following ways, none of which yield a solution where the IDE issues flagged match the Sonar server's flagged issues.
Has anyone integrated Sonar Findbugs, PMD and Checkstyle rules with Intellij on a multi-module Gradle-built java project?
I've tried these steps:
Attempt #1 Sonar has put out an Intellij plugin (https://github.com/SonarSource/sonar-intellij). I attempted to install and configure it with my Sonar server. The plugin was able to hit the Sonar server to pull down profiles, but it was not able to integrate with our gradle project. Right now only multi-module Maven projects appear to be supported by this plugin.
Attempt #2 There is a community developed Sonar Intellij plugin (https://github.com/sonar-intellij-plugin/sonar-intellij-plugin). I stepped through documentation install steps and did troubleshooting to integrate the plugin with individual modules and the top level project. Neither works. When i select 'sync with sonar' I am not able to see the sonar profile when I edit the profiles in 'Analyze code' within the Intellij IDE.
Attempt #3 I found another Intellij plugin called QAPlug (http://plugins.jetbrains.com/plugin/4594) and followed some instructions to export Sonar Findbugs, PMD & Checkstyle rules so that I could import them into this QAPlug and analyze the code using the same rules as the Sonar server. I followed these instructions (http://qaplug.com/about/tutorials/) and got errors when trying to import the FindBugs config I had exported from Sonar. I did some Regex and reformatted the Findbugs component of the export from Sonar to convert it to the format that is importable to the QAPlug plugin in Intellij. I was able to import this ruleset, but got different results from those in Sonar itself. I got the same effect when I followed the advice from post: Sonar, QAPlug, IntelliJ Integration - Multiple profiles?
Upvotes: 1
Views: 2424
Reputation: 1389
I contacted Intellj directly and their response to me was to use the community developed plugin (Attempt #2 above).
Given that answer and the lack of additional feedback here, the answer appears to be sonar integration with Intellij 13 is not supported for multi-module gradle java projects by the currently available plugins.
Upvotes: 0