-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for PHPStrom #40
Comments
Hi @Nyholm, thanks for the bug report. Which exact version of PHPStorm are you using? The plugin should show up in the project settings dialog of the IDE. There should be an entry called "Sonar Configuration". Can you see this entry? Cheers |
Im using the latest version. PHPStorm 6.0.2 build #PS-129.487. There is not an entry called "Sonar Configuration" in the IDE settings dialog nor under project settings. |
Thanks again for pointing this out, @Nyholm. I guess I found the problem. This wiki page describes that our plugin.xml is missing plugin dependency declaration:
I will add the tags later today and test it with these. /cc @gshakhn FYI |
Thank you. Please let me know if I can assist with testing or anything else. |
* added <depends> tags to plugin.xml * modified plugin description in pom.xml Issues: 40
I added a downloadable version of the plugin here. https://github.com/aheusingfeld/sonar-intellij-plugin/tree/issue-40-download/download @Nyholm would you mind to test it and provide some feedback? Thanks in advance |
I'm on it. |
@aheusingfeld I see the settings entry now and the config test passes. When I open a new file I can see the sonar window loading but it does not fetch any data. The problem might be with my sonar installation... I don't know. |
Open the module settings and check that the Sonar settings for the modules have been applied. This happens when you hit the "Apply to all modules" button in the project settings after entering the correct URL + credentials. You can also try to right-click a file and choose "Open in Sonar ...". This will open the file in your Sonar installation's webUI BTW: the host field will only take IP + port. For example: "192.168.172.14:9000" |
I'm pretty sure the plugin only supports Java code at the moment. Search for references to PsiJavaFile. We could make the plugin be installable on PHPStorm, but I don't think it'll work with PHP files. |
Yes. "sonar.r" is probably not a valid sonar URL. Try to specify Hostname/ IP + Port. |
@gshakhn Seems you are right. We limit our tooling to PsiJavaFile at the moment but as far as i can see we could try to use the same approach with PsiFile. |
sonar.r is a valid URL. I access my sonar dashboard with http://sonar.r. (I've done some changes in my /etc/hosts file) I'm not familiar with PsiJavaFile what's that? |
Try putting in the port as well. PsiJavaFile is how the plugin looks at project files and grabs the info from sonar for them. I'm guessing it will prevent it from working with PHP files. We'll need to look into making it more generic if we want to support more languages. |
Adding port does not make any difference. I do get authorisation errors if I give a false username/password. I don't believe it's anything wrong with the connection. I think @gshakhn is right. Is it a big change to make it work with PHP files? I browsed the source code of the plugin and it seams that you could be using PsiClassOwner instead of PsiJavaFile. But I don't know if there is a "PsiPhpFile" or something similar in the Intellij api.. |
We should even be fine with a PsiFile. I'm currently looking into this but I don't know whether I can finish it this weekend! |
Thank you for your efforts. |
No worries. I appreciate that you are willing to implement this feature. |
Our new plugin at https://github.com/sonar-intellij-plugin/sonar-intellij-plugin/ already supports PhpStorm. |
At the plugin page (http://plugins.jetbrains.com/plugin?pr=idea&pluginId=7168) it says that PHPStorm is not supported. At the list of all plugins to PHPStorm (http://plugins.jetbrains.com/search/index?pr=phpStorm&search=sonar) you cant find this plugin.
I tried to install the plugin by placing the plugn folder (sonar-intellij-plugin-1.0.7) in my PHPStrom.app/plugins. PHPStorm recognise the plugin and I get no errors. But I can't use it according to usage instructions.
Is there support for PHPStrom? How can I make it work?
The text was updated successfully, but these errors were encountered: