SlideShare a Scribd company logo
http://www. sonarsource.org Quality Management Platform
What is ‘Code quality platform’? Sonar is an open platform to manage code quality. As such, it covers the 7 axes of code quality:  Architecture & Design, Comments, Coding rules, Potential bugs, Complexity, Unit tests, Duplications. B enefit of using  ‘Code quality platform’ -  q uality is central  and you can easily manage it. Quality Management Platform
Sonar has been a very popular quality management platform. The platform is billed as to  continuously analyze  and  measure the code quality . Sonar is an aggregate tool for complex source code management and quality measures. It uses Clover2, Cobertura, PMD, Checkstyle, and Findbugs under the hood.  What is  Sonar  ?  Many l anguages  are  covered  (Java, C, .Net, Flex, PHP, PL/SQL, Cobol,  JSP, JSF, Visual Basic 6) ; Extend ed  with plugins ; All quality in one central place;   Web-based application and everything is in 3 clicks;
All projects are in the open  Easy d rill down to source code Coding rules Unit Tests Standard Metrics TimeMachine Maven ready Leverage existing components Plugins Security Why use  Sonar ?
There is a very simple procedure: Create a file named 'pom.xml' into the root directory of your project  Execute the maven2 plugin  (#> mvn sonar:sonar) And that’s it!  Any m anual measures   can be  easily  managed directly from the component (project, module or package) dashboard There is a possibility to integrate  with Bamboo, CruiSeControl, Hudson, TeamCity. How  Sonar  works?
Home page | filters | favourites Browsing project | customising dashboards |  Rules Compliance Index (RCI) | Treemap | Events | Alerts The resource viewer | violation tab| duplication tab| coverage tab | dependencies tab |  Quality profiles | Alert configuration Time machine | custom chart Tendencies Coding rule mapping ( Checkstyle ,  PMD ,  Findbugs ) Update center | plug-in Library Sonar in actions
Physical lines  |  Lines of code  Comment lines  |  Commented-out lines of code  Packages  | Files | Classes | Directories Accessors  | methods | Public API  Duplicated lines  | blocks | files  Statements  |  Complexity  |  complexity by method  |  Average complexity by file  Unit tests  |  Line coverage  Tags | etc Sonar metrics CHECKSTYLE  | PMD | FindBugs
Main features: Possible bugs - empty try/catch/finally/switch statements  Dead code - unused local variables, parameters and private methods  Suboptimal code - wasteful String/StringBuffer usage  Overcomplicated expressions - unnecessary if statements, for loops that could be while loops Duplicate code - copied/pasted code means copied/pasted bugs   PMD   ( Programming Mistake Detector )
Sonar is a  web application  and requires a maven plugin that uses both a database s .  System Requirements Java Development Kit v.1.5 or later Maven 2.x or 3.x (since Sonar  2.4) Database (Mysql, Oracle, PostgreSQL, MSSQL) Web  Server needs a healthy 500Mb of RAM  Browser should  allow  Javascript
Thank you! :) Author: Trusov Aleksey Any questions?

More Related Content

PPT
CiklumJavaSat15112011:Alexey Trusov-Code quality management
PPTX
Beyond the basics of SonarQube: improve your Java(Script) code even further
PPTX
SonarQube - The leading platform for Continuous Code Quality
DOC
Resume_Trupti
PDF
The story of SonarQube told to a DevOps Engineer
PPTX
Tracking your Technical Debt with Sonarqube
PPTX
Static code analysis with sonar qube
PDF
Java Source Code Analysis using SonarQube
CiklumJavaSat15112011:Alexey Trusov-Code quality management
Beyond the basics of SonarQube: improve your Java(Script) code even further
SonarQube - The leading platform for Continuous Code Quality
Resume_Trupti
The story of SonarQube told to a DevOps Engineer
Tracking your Technical Debt with Sonarqube
Static code analysis with sonar qube
Java Source Code Analysis using SonarQube

What's hot (13)

PDF
SonarQube - Should I Stay or Should I Go ?
PPTX
PPTX
Building a high quality+ products with SCA
DOCX
PrathikR_Resume
PDF
SonarQube
PDF
Code Quality Lightning Talk
DOC
PDF
Tech Talk #5 : Code Analysis SonarQube - Lương Trọng Nghĩa
PPTX
Next-gen Automation Framework
PPTX
Hp fortify source code analyzer(sca)
PPTX
Fortify - Source Code Analyzer
PPTX
Track code quality with SonarQube
PPTX
BSides Rochester 2018: Drew Kirkpatrick: Open Source SAST and DAST Tools for ...
SonarQube - Should I Stay or Should I Go ?
Building a high quality+ products with SCA
PrathikR_Resume
SonarQube
Code Quality Lightning Talk
Tech Talk #5 : Code Analysis SonarQube - Lương Trọng Nghĩa
Next-gen Automation Framework
Hp fortify source code analyzer(sca)
Fortify - Source Code Analyzer
Track code quality with SonarQube
BSides Rochester 2018: Drew Kirkpatrick: Open Source SAST and DAST Tools for ...
Ad

Similar to Sonar En (20)

PPTX
Training material sonar v1
PPTX
Sonar Tool - JAVA code analysis
PDF
Continuous Inspection of Code Quality: SonarQube
PPTX
Static-Code-Analysis-using-Sonar-Cloud new.pptx
PPTX
Sonar qube to impove code quality
PPTX
SonarQube.pptx
DOCX
What is SonarQube in DevOps.docx
PPTX
Blackboard DevCon 2012 - Ensuring Code Quality
PDF
Continuous inspection with Sonar
PDF
Control source code quality using the SonarQube platform
PPTX
Paying Off Your Technical Debt
PPTX
Maven.pptx
PPTX
SonarQube Presentation.pptx
PPTX
A year of SonarQube and TFS/VSTS
PPTX
Sonar Review
PPTX
Track code quality with SonarQube - short version
PPTX
Java Code Quality Tools
PPTX
postgres.pptx
PDF
Tracking and improving software quality with SonarQube
Training material sonar v1
Sonar Tool - JAVA code analysis
Continuous Inspection of Code Quality: SonarQube
Static-Code-Analysis-using-Sonar-Cloud new.pptx
Sonar qube to impove code quality
SonarQube.pptx
What is SonarQube in DevOps.docx
Blackboard DevCon 2012 - Ensuring Code Quality
Continuous inspection with Sonar
Control source code quality using the SonarQube platform
Paying Off Your Technical Debt
Maven.pptx
SonarQube Presentation.pptx
A year of SonarQube and TFS/VSTS
Sonar Review
Track code quality with SonarQube - short version
Java Code Quality Tools
postgres.pptx
Tracking and improving software quality with SonarQube
Ad

Sonar En

  • 2. What is ‘Code quality platform’? Sonar is an open platform to manage code quality. As such, it covers the 7 axes of code quality: Architecture & Design, Comments, Coding rules, Potential bugs, Complexity, Unit tests, Duplications. B enefit of using ‘Code quality platform’ - q uality is central and you can easily manage it. Quality Management Platform
  • 3. Sonar has been a very popular quality management platform. The platform is billed as to continuously analyze and measure the code quality . Sonar is an aggregate tool for complex source code management and quality measures. It uses Clover2, Cobertura, PMD, Checkstyle, and Findbugs under the hood. What is Sonar ? Many l anguages are covered (Java, C, .Net, Flex, PHP, PL/SQL, Cobol, JSP, JSF, Visual Basic 6) ; Extend ed with plugins ; All quality in one central place; Web-based application and everything is in 3 clicks;
  • 4. All projects are in the open Easy d rill down to source code Coding rules Unit Tests Standard Metrics TimeMachine Maven ready Leverage existing components Plugins Security Why use Sonar ?
  • 5. There is a very simple procedure: Create a file named 'pom.xml' into the root directory of your project Execute the maven2 plugin (#> mvn sonar:sonar) And that’s it! Any m anual measures can be easily managed directly from the component (project, module or package) dashboard There is a possibility to integrate with Bamboo, CruiSeControl, Hudson, TeamCity. How Sonar works?
  • 6. Home page | filters | favourites Browsing project | customising dashboards | Rules Compliance Index (RCI) | Treemap | Events | Alerts The resource viewer | violation tab| duplication tab| coverage tab | dependencies tab | Quality profiles | Alert configuration Time machine | custom chart Tendencies Coding rule mapping ( Checkstyle , PMD , Findbugs ) Update center | plug-in Library Sonar in actions
  • 7. Physical lines | Lines of code Comment lines | Commented-out lines of code Packages | Files | Classes | Directories Accessors | methods | Public API Duplicated lines | blocks | files Statements | Complexity | complexity by method | Average complexity by file Unit tests | Line coverage Tags | etc Sonar metrics CHECKSTYLE | PMD | FindBugs
  • 8. Main features: Possible bugs - empty try/catch/finally/switch statements Dead code - unused local variables, parameters and private methods Suboptimal code - wasteful String/StringBuffer usage Overcomplicated expressions - unnecessary if statements, for loops that could be while loops Duplicate code - copied/pasted code means copied/pasted bugs PMD ( Programming Mistake Detector )
  • 9. Sonar is a web application and requires a maven plugin that uses both a database s . System Requirements Java Development Kit v.1.5 or later Maven 2.x or 3.x (since Sonar 2.4) Database (Mysql, Oracle, PostgreSQL, MSSQL) Web Server needs a healthy 500Mb of RAM Browser should allow Javascript
  • 10. Thank you! :) Author: Trusov Aleksey Any questions?