2. SONAR is an open source quality management platform, dedicated
to continuously analyze and measure source code quality, from the
portfolio to the method. As such, it covers the 7 axes of code
quality.
Architecture and Design
Duplications
Unit tests
Comments
Coding Rules
Sources
Potential bugs Complexity
3. Sonar has got a very efficient way of navigating, a balance between
high-level view, dashboard, Time Machine and defect hunting tools.
This enables to quickly uncover projects and / or components that
are in Technical Debt to establish action plans.
Portfolio
view
Project
insight
Source
code
Hunting Tool Box
Action Plans
4. Extend with plugins:
Covering new languages, adding rules engines, computing advanced
metrics can be done through a powerful extension mechanism.
More than 50 plugins are already available.
Quality is central:
Sonar is a web-based application. Rules, alerts, thresholds,
exclusions, settings can be configured online. By leveraging its
database, Sonar not only allows to combine metrics altogether but
also to mix them with historical measures.
Languages covered:
Java is built in. Open Source and commercial plugins enable to cover C, C#, Flex,
Natural, PHP, PL/SQL, Cobol and Visual Basic 6.
6. Installation and Configuration
Prerequisite:
The only prerequisite to run Sonar is to have Java (Oracle JDK 1.5
onwards) installed on your machine.
Hardware Requirements:
1.The Sonar web server requires at least 500Mb of RAM to run
efficiently.
2.In terms of data space and as an indication, on Nemo the public
instance of Sonar, 10 Go of data space are used to analyze more than
13 millions Lines of Code with a history of 4 years. Nemo is currently
running on a Amazon EC2 small instance.
3.To get the full experience Sonar has to offer, you should enable
Javascript in your browser.
7. Sonar is made of 3 components:
1.A Database that stores the configuration and results of quality analysis
2.A Web Server that is used to navigate the results of the analyzes and make
configuration
3.A Client that will run source code analyzers to compute data on projects
8. Installing Sonar Server
Prior to the installation, check the requirements.
Download and unzip the distribution. sonar-3.2.zip
from
http://www.sonarsource.org/downloads/
13. Features:
The Sonar Ant Task allows to integrate Sonar into a build script for
Apache Ant to analyze a project with Sonar.
Prerequisites:
•Ant 1.7.1 or higher
•Java 1.5 or higher
Scope of Analysis:
Sonar has capability to perform analysis on 15+ languages.The
outcome of this analysis is going to be mainly measures of metrics
and violations of coding rules. However, what gets analyzed by Sonar
will vary depending on the language analyzed:
•On all languages, Sonar performs static analysis of source
code (java files, Cobol programs, etc.)
•Sonar can perform static analysis of compiled code on certain
languages (.class files or jars in Java, dll files in C#, etc.)
•Sonar can perform dynamic analysis of code on certain
languages (execution of unit tests in Java, C#, etc.)