Closed engrun closed 10 years ago
Hi,
the resource name is configured in sonar-project.properties: sonar.projectKey=YOUR_RESOURCE_KEY
for module it is: PROJECTS_KEY:MODULE_KEY
Hi and thanks for reply
How do I find YOUR_RESOURCE_KEY? and what is sonar-project.properties? I have no such file
Hi Rune,
you can find the IDs in the Sonar WebUI! When you're on the dashboard, click on "Projects" in the menu, a dropdown menu with all configured projects appears. When you hover over a project name in this dropdown menu, you can see the keys in the URL.
For maven based java projects, Sonar e.g. takes "groupId:artifactId" (PROJECTS_KEY:MODULE_KEY) as the key.
Hi This was my initial thought, however nothing happens when trying to sync with Sonar. I have retried now, but still no success (I have just configured the connection at project level)
please tell more details what exactly do you use as resource string? which sonar version? FYI one of the next features will be to improve the configuration ;)
Duh! Found a typo in the resource config
no:tine:reku:Develop should be no.tine:reku:Develop (punctuation instead of semicolon as the first delimiter)
works ok now. Thanks!
oh, hard to see :) :+1:
Hmm. Managed to sync with Sonar, and I have setup a inspection profile for Sonar, and tried to analyze a file that SonarCube flags with warnings. However, I get "No suspicious code found". Is there a log somewhere that I can check, or turn on debug logging?
currently there is no possibility to enable some log / debug information
copied comment from http://plugins.jetbrains.com/plugin/7238
currently the project structure in intellij idea must be the same as sonar properties. e.g. project: . .. src test
and you marked src as source directory in intellij, then you also have to set sonar.sources=src in your sonar-project.properties and run the analysis once to upload the results
an intellijj restart could be also helpful ;)
I using default Maven structure, and running analysis with the sonar maven plugin. As far as I understand, this should be ok?
I tried to uninstall and reinstall, however, now I am using this one instead https://github.com/sonar-intellij-plugin/sonar-intellij-plugin as this was the only one available in the plugin repo
it's fine, this plugin was merged to to one you have downloaded does it work now for you? A maven project should work fine
No, it still reports "No suspicious code found" And the whole process finishes after just miliseconds, so my guess is that it doesn't perform the actual inspection
@engrun could you check whether you actually have the Sonar rules activated in your "Inspection profile"?
now I am using this one instead https://github.com/sonar-intellij-plugin/sonar-intellij-plugin
That is the new home of this plugin. From now on you could also raise issues there. :)
it still reports "No suspicious code found"
Did you check back on #22? It seems to be the same issue. Unfortunately we're facing this very often since IntelliJ 12
I have verified that the inspection profile is activated.
I have enabled Sonar inspections in the default inspection profile, and warnings are reported correctly, apart from the Sonar inspections.
I'll close this and monitor #22 instead
Thanks
Hi
Can you please shed some light on the Resource parameter in the connector tab. I can get a conneciton successfully, however, when syncing nothing seems to happen. Not sure I got the syntax for the resource correct