Once the installation of Sonar is complete, you are ready to launch analyses on your projects.
| Table of Contents |
What does Sonar analyze?
Sonar performs a static analysis of your code.
Sonar analyzes 15+ languages. The code that is analyzed may be:
- Source code (.java files in Java, Cobol programs, etc.)
- Compiled code (.class files or jars in Java, dll files in C#, etc.)
By analyzing your code, the Sonar engine:
- Computes measures (lines of code, cyclomatic complexity, etc.) at different levels (file, module, project, application portfolio, etc.)
- Detects violations (non-respects of coding standards)
For some languages (like Java or C# for example), Sonar can also provide information on automated unit and integration tests like number of failing tests, code coverage, etc.
How to launch an analysis?
For a project embedding different languages, each of them needs to be analyzed by running its own Sonar analysis. The the results can be aggregated at project level, using the Views plug-in.
There are several ways Sonar analysis can be performed:
- using the Maven Plugin
- using the Ant Task
- using the Java Runner
- using a CI engine
A series of advanced parameters is available when running analysis.

