Complete details on how to configure phpstorm for sonar qube server and also analyze my local code with sonar qube server configured on a centralized machine.

Hi All,
I am new to phpstorm and sonar,
I am more quick on configuring SONAR QUBE on a server machine,
But when I am integrating SONAR with PHPSTORM I am unable to make it succesfull.

There are no errors nothing.

Process I have done:

#1.Installed PHPSTORM in my LOCAL and selected a php project.
#2.Configured Sonar Qube for PHPSTORM by fllowing -- https://github.com/sonar-intellij-plugin/sonar-intellij-plugin -- link.
#3.And now If I test the connection it is showing success.
#4.When I am trying to inspect my code with sonarQube,and check the result on my sonar dashboard.
#5.Here I am unable to see anything when I run Inspect code.

report1.PNG
report2.png

report3.PNG


Please help me on this ASAP,as I am struck on this.

5 comments

And have you expanded tree node for details?

0

If my understanding is correct you are referring to the tree which is in PHPSTORM....?
If YES
then
I have expanded the tree but I have seen this tree of result even before configuring sonar plugin.

Here my objective is to use phpstorm as my IDE for PHP development and connect to SONAR QUBE server(Which is configured with my own coding rules) located in another machine,
and analyze my local code and get results in PHPstorm itself rather than opening the URL of SONAR.

I am expecting the same that ECLIPSE works for JAVA.

0

Praveen,

As described at https://github.com/sonar-intellij-plugin/sonar-intellij-plugin you have to run SonnurQube runner at first: http://docs.codehaus.org/display/SONAR/Analyzing+with+SonarQube+Runner
After that in SonarQube web interface you will be able to get resource of your project as described at https://github.com/sonar-intellij-plugin/sonar-intellij-plugin in Resource part which you need to provide in PhpStorm settings.

Please note that you will need to install PHP plugin in Sonar first and provide sonar-project.properties file in project directory as described on resources above.

After that you should Right Click->Sync with sonar. New inspections will be loaded and PhpStorm will ask to restart. After that you will get expected functionality.

0

Hi ,
How can I configure RESOURSE field in Sonar Connecter

1pg.PNG

0

As described on: [https://github.com/sonar-intellij-plugin/sonar-intellij-plugin]

The Resource field

You can find the "

Resource
" name specific for your project in the Sonar WebUI! When you're on the main dashboard of your SonarQube installation (e.g. http://localhost:9000/), you see the "Projects" section on the right listing all the projects you already ran an analysis for.1 When you hover the cursor over a project name in this list, the title/ hint you can see is the project's resourceId. For Maven projects it also contains a colon like "
groupId:artifactId
" or "
PROJECTS_KEY:MODULE_KEY
".


Please take a look at attached screenshot.

Attachment(s):
sonar.png
0

Please sign in to leave a comment.