Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Sonar support multiple language in same project?

I am setting up Sonar for one of my projects which is a mix of Groovy and Java. I am able to configure the project separately for either of these languages but not together. Is there any way to do this? I tried this

sonar.language = java,grvy

but didnt work

like image 912
rajesh Avatar asked Nov 29 '12 11:11

rajesh


People also ask

How many languages are supported by SonarQube?

SonarQube includes support for the programming languages Java (including Android), C#, C, C++, JavaScript, TypeScript, Python, Go, Swift, COBOL, Apex, PHP, Kotlin, Ruby, Scala, HTML, CSS, ABAP, Flex, Objective-C, PL/I, PL/SQL, RPG, T-SQL, VB.NET, VB6, and XML.

What is the difference between SonarQube and Sonar scanner?

SonarQube is the central server holding the results of analysis. SonarQube Scanner / sonar-scanner - performs analysis and sends the results to SonarQube. It is a generic, CLI scanner, and you must provide explicit configurations that list the locations of your source files, test files, class files, ...

Does SonarQube only analysis Java code?

SonarQube is an open source quality management platform, designed to analyze and measure your code's technical quality. It is used to test code written in the main programming languages such as C/C++, JavaScript, Java, C#, PHP, and Python, and even a combination of several languages simultaneously.

Is SonarQube static code analysis?

SonarQube is a Code Quality Assurance tool that collects and analyzes source code, and provides reports for the code quality of your project. It combines static and dynamic analysis tools and enables quality to be measured continually over time.


2 Answers

UPDATE April 14th, 2014:

Starting with SonarQube 4.2, multi-language projects are supported.

This automatically happens when sonar.language is not set.

See my sample project here: https://github.com/bellingard/multi-language-project

like image 144
Fabrice - SonarSource Team Avatar answered Sep 28 '22 07:09

Fabrice - SonarSource Team


If you are using Sonar version 3.4. Then I have written a new maven plugin to help you with multiple language code analysis.

It is still beta

https://code.google.com/p/sonar-multilang-maven-plugin/wiki/UserGuide

If you have any issues with this tool then do let me know on that project website.

like image 41
Neeraj Mittal Avatar answered Sep 28 '22 08:09

Neeraj Mittal