wood burning stoves 2.0
The moose likes IDEs, Version Control and other tools and the fly likes SonarQube in Action -> multiple languages? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "SonarQube in Action -> multiple languages?" Watch "SonarQube in Action -> multiple languages?" New topic

SonarQube in Action -> multiple languages?

darren hartford

Joined: May 17, 2010
Posts: 23
Hi all,
I've been reviewing Sonar for a while, and was wondering for those that use sonar how you handle multi-language projects?

For example, it is common to have java, html, xml, sql, css, javascript all in the same project, and managing the quality of the java, xml, and javascript could be challenging.

How have people overcome this challenge, and/or if Sonar can assist in improving the quality?

(unfortunately I have many questions of sonar, so more coming....)

Patroklos Papapetrou
Ranch Hand

Joined: Aug 06, 2013
Posts: 32

Hi Darren

Indeed, this is on of the most popular questions in mailing lists.
Currently you can not run a unique SonarQube analysis for multiple languages but you can run different analysis for each language used.
All you have to do is to set the property sonar.language and to avoid overwriting the previous analysis it's a good practice to use the sonar.branch property as well. So if you have in project, java and javascript source files then you have to run two different analysis and you will end up with two different "projects" (one for Java and one for Javascript ) in SonarQube.

There are several plugins for the most well-known languages that include hundreds of coding rules and definitely it worth the effort to analyze a project for all languages and improve the quality.

Follow me on twitter ( @ppapapetrou76 ) or see my linked profile and connect with me
You can slso subscribe to my technical blog
G. Ann Campbell
Ranch Hand

Joined: Aug 06, 2013
Posts: 33
Depending on how your project is organized, it may also be possible to do a multi-module analysis
I agree. Here's the link: http://aspose.com/file-tools
subject: SonarQube in Action -> multiple languages?
It's not a secret anymore!