• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SonarQube in Action -> multiple languages?

 
darren hartford
Greenhorn
Posts: 25
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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....)

thanks!
-D
 
Patroklos Papapetrou
Author
Ranch Hand
Posts: 32
5
Java Netbeans IDE Scala
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
G. Ann Campbell
Author
Ranch Hand
Posts: 33
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depending on how your project is organized, it may also be possible to do a multi-module analysis
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic