Sonar
-
Upload
prabakaranbrick -
Category
Technology
-
view
174 -
download
1
description
Transcript of Sonar
![Page 1: Sonar](https://reader033.fdocuments.us/reader033/viewer/2022060115/55790a78d8b42a03578b4911/html5/thumbnails/1.jpg)
SONAR
BY PRABAKARAN.J
![Page 2: Sonar](https://reader033.fdocuments.us/reader033/viewer/2022060115/55790a78d8b42a03578b4911/html5/thumbnails/2.jpg)
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
Potential bugs Complexity
Sources
![Page 3: Sonar](https://reader033.fdocuments.us/reader033/viewer/2022060115/55790a78d8b42a03578b4911/html5/thumbnails/3.jpg)
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
Action Plans
Hunting Tool Box
![Page 4: Sonar](https://reader033.fdocuments.us/reader033/viewer/2022060115/55790a78d8b42a03578b4911/html5/thumbnails/4.jpg)
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.
![Page 6: Sonar](https://reader033.fdocuments.us/reader033/viewer/2022060115/55790a78d8b42a03578b4911/html5/thumbnails/6.jpg)
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.
![Page 7: Sonar](https://reader033.fdocuments.us/reader033/viewer/2022060115/55790a78d8b42a03578b4911/html5/thumbnails/7.jpg)
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
![Page 8: Sonar](https://reader033.fdocuments.us/reader033/viewer/2022060115/55790a78d8b42a03578b4911/html5/thumbnails/8.jpg)
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/
![Page 9: Sonar](https://reader033.fdocuments.us/reader033/viewer/2022060115/55790a78d8b42a03578b4911/html5/thumbnails/9.jpg)
Start the SONAR based on your OS go to \bin\windows-x86-32
![Page 11: Sonar](https://reader033.fdocuments.us/reader033/viewer/2022060115/55790a78d8b42a03578b4911/html5/thumbnails/11.jpg)
For login
User:admin Password:admin
![Page 12: Sonar](https://reader033.fdocuments.us/reader033/viewer/2022060115/55790a78d8b42a03578b4911/html5/thumbnails/12.jpg)
Installing and Configuring Ant Task
![Page 13: Sonar](https://reader033.fdocuments.us/reader033/viewer/2022060115/55790a78d8b42a03578b4911/html5/thumbnails/13.jpg)
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.)
![Page 14: Sonar](https://reader033.fdocuments.us/reader033/viewer/2022060115/55790a78d8b42a03578b4911/html5/thumbnails/14.jpg)
Projects List:
![Page 15: Sonar](https://reader033.fdocuments.us/reader033/viewer/2022060115/55790a78d8b42a03578b4911/html5/thumbnails/15.jpg)
Project Dashboard:
![Page 16: Sonar](https://reader033.fdocuments.us/reader033/viewer/2022060115/55790a78d8b42a03578b4911/html5/thumbnails/16.jpg)
Hotspots:
![Page 17: Sonar](https://reader033.fdocuments.us/reader033/viewer/2022060115/55790a78d8b42a03578b4911/html5/thumbnails/17.jpg)
Reviews:
![Page 18: Sonar](https://reader033.fdocuments.us/reader033/viewer/2022060115/55790a78d8b42a03578b4911/html5/thumbnails/18.jpg)
Time Machine:
![Page 19: Sonar](https://reader033.fdocuments.us/reader033/viewer/2022060115/55790a78d8b42a03578b4911/html5/thumbnails/19.jpg)
Components :
![Page 20: Sonar](https://reader033.fdocuments.us/reader033/viewer/2022060115/55790a78d8b42a03578b4911/html5/thumbnails/20.jpg)
Violations Drilldown:
![Page 21: Sonar](https://reader033.fdocuments.us/reader033/viewer/2022060115/55790a78d8b42a03578b4911/html5/thumbnails/21.jpg)
Clouds:
![Page 22: Sonar](https://reader033.fdocuments.us/reader033/viewer/2022060115/55790a78d8b42a03578b4911/html5/thumbnails/22.jpg)
Libraries:
![Page 23: Sonar](https://reader033.fdocuments.us/reader033/viewer/2022060115/55790a78d8b42a03578b4911/html5/thumbnails/23.jpg)
Reference:
http://www.sonarsource.org/downloads/
http://docs.codehaus.org/display/SONAR/Installing+Sonar