|
Our web app projects currently have both Java and JavaScript source code in the same project. We want to run sonar during the build to analyze both Java and JavaScript code.
We have the Java analysis working. We also have the JavaScript (mostly) working using the jstd-maven-plugin, but I don't know how to get both working (if it's possible) with Sonar since once we specify the sonar.language property as "js", it seems to stop doing Java analysis and I can only seem associate the project to one sonar quality profile (that I can tell).
Is this even possible and if so, can someone point me to a helpful resource? :-) Many thanks!
|
|
Hi Jeff,
I'm afraid it is not possible. You need to create another pom to analyze your JavaScript source code and then run two Sonar analyses: one for Java, one for JavaScript. You can then aggregate the results using Views.
Regards,
David RACODON | SonarSource
Senior Consultant On 29 June 2012 19:05, Jeff <[hidden email]> wrote: Our web app projects currently have both Java and JavaScript source code in the same project. We want to run sonar during the build to analyze both Java and JavaScript code. |
|
In reply to this post by Jeff
Hi Jeff
With Sonar you can analyse only one language per analysis. To avoid overriding analysis you have to use the sonar.branch property for the javascript analysis. For our convenience we use the same for sonar.branch and sonar.language but you can have different property values.
For example if you are using maven then you can run the following cmd mvn sonar:sonar -Dsonar.branch=js -Dsonar.language=js
Regards
2012/6/29 Jeff <[hidden email]> Our web app projects currently have both Java and JavaScript source code in the same project. We want to run sonar during the build to analyze both Java and JavaScript code. |
|
Sweet! That works! Thank you!
On Fri, Jun 29, 2012 at 11:21 AM, Papapetrou P.Patroklos <[hidden email]> wrote: Hi Jeff I ♥ DropBox !! |
| Powered by Nabble | Edit this page |
