SlideShare a Scribd company logo
1 of 18
SONAR
KATE SEMIZHON
SONARQUBE
AN OPEN SOURCE WEB APPLICATION
TO MANAGE CODE QUALITY
WHAT IS SONAR
Sonar covers the 7 axes of code quality
CONTINUOUS
INSPECTION
- the practice of measuring your code on a very regular
basis
- raises code quality visibility for all stakeholders
- Continuously Improve the code quality
50+ PLUGINS
LANGUAGES
DEV TOOLS
http://docs.codehaus.org/display/SONAR/Plugin+Library/
INTEGRATION
AUTHENTIFICATION &
AUTHORIZATION
GOVERNANCE
VIZUALIZATION &
REPORTING
ADDITIONAL
METRICS
CLIENT LIST
CASE STUDY
“There used to be numerous code-related issues that escalated over
time and cost us a lot.”
“SonarQube has triggered a three-fold business impact
that we have seen extensively in every project team we
have on-boarded – delivery excellence (time to capability
reduced), engineering excellence (quality improvement)
and business value (cost savings).”
“A defect caught at an earlier stage in the PLC is way less expensive
than one caught later on.”
http://www.sonarsource.com/customers/customer-stories/
leader in networking technologies.
• 73,460 employees
• Q2 FY13 revenues of $12.1 billion
• uses SonarQube to analyze >9 million
lines of code in 90 applications
WHY?
Prevention is the best medicine
BENEFITS
Quality improvements of code produced by increasing
developer knowledge and understanding of code quality issues.
Reducing maintenance cost through early identification of
quality issues.
Reducing time that is spent on code reviews
Improving the productivity of software development teams
(suppress code duplication and redundancy)
Automatic detection of bugs and provides an opportunity to fix
them before rolling software out to production
SONAR DASHBOARD
List of projects/apps
Quality metrics
Developers
7 Deadly
Sin
Bugs and
Potential
Bugs
Coding
Standards
Breach
Duplications
Lack of Unit
Tests
Bad
Distribution
of
Complexity
Spaghetti
Design
Not Enough
or Too Many
Comments
KEY METRICS
 Potential bugs
 Potential performance problems
 Potential security issues
 Duplicates
 Сoverage
 Time machine
POTENTIAL BUGS
Return statements should not occur in finally blocks
This class overrides "equals()" and should therefore also override
"hashCode()”
"equals(Object obj)" should be overridden along with the
"compareTo(T obj)" method
Thread.run() and Runnable.run() should not be called directly
INCORRECT EXCEPTION
PROCESSING
Throwable and Error classes should not be caught
Generic exceptions Error, RuntimeException, Throwable
and Exception should never be thrown
Avoid Print Stack Trace
Avoid Rethrowing Exception
Avoid Catching/throwing NPE
Avoid Instanceof Checks In Catch Clause
INCORRECT STRING
PROCESSING
name description
StringInstantiation Avoid instantiating String objects; this is usually unnecessary.
Inefficient String Buffering Avoid concatenating non literals in a StringBuffer constructor or
append()
Use Index Of Char Use String.indexOf(char) when checking for the index of a single
character; it executes faster.
String To String Avoid calling toString() on String objects; this is unnecessary.
Useless String Value Of No need to call String.valueOf to append to a string; just use the
valueOf() argument directly.
String Literal Equality Checks that string literals are not used with == or !=.
Unnecessary Case Change Using equalsIgnoreCase() is faster than using
toUpperCase/toLowerCase().equals()
PROCESS
Set up
threshold
Daily
reports
Sonar
plugin for
developers
to verify
code
Emails
alerts
Sprint
Reports to
track
quality
COST
Object Cost
SonarQube Free
Plugins Free
Sonar Installation and
Configuration
1 day - DevOps
Compare stats once a sprint 1h
Verify new code by developers Ongoing Activities – part of the
development
Sonar Review

More Related Content

What's hot

Tech Talk #5 : Code Analysis SonarQube - Lương Trọng Nghĩa
Tech Talk #5 : Code Analysis SonarQube - Lương Trọng NghĩaTech Talk #5 : Code Analysis SonarQube - Lương Trọng Nghĩa
Tech Talk #5 : Code Analysis SonarQube - Lương Trọng NghĩaNexus FrontierTech
 
Code Quality Lightning Talk
Code Quality Lightning TalkCode Quality Lightning Talk
Code Quality Lightning TalkJonathan Gregory
 
Tracking and improving software quality with SonarQube
Tracking and improving software quality with SonarQubeTracking and improving software quality with SonarQube
Tracking and improving software quality with SonarQubePatroklos Papapetrou (Pat)
 
Track code quality with SonarQube - short version
Track code quality with SonarQube - short versionTrack code quality with SonarQube - short version
Track code quality with SonarQube - short versionDmytro Patserkovskyi
 
Sonar Tool - JAVA code analysis
Sonar Tool - JAVA code analysisSonar Tool - JAVA code analysis
Sonar Tool - JAVA code analysisPrashant Gupta
 
Managing code quality with SonarQube
Managing code quality with SonarQubeManaging code quality with SonarQube
Managing code quality with SonarQubeRadu Vunvulea
 
SonarQube - The leading platform for Continuous Code Quality
SonarQube - The leading platform for Continuous Code QualitySonarQube - The leading platform for Continuous Code Quality
SonarQube - The leading platform for Continuous Code QualityLarry Nung
 
Static code analysis with sonar qube
Static code analysis with sonar qubeStatic code analysis with sonar qube
Static code analysis with sonar qubeHayi Nukman
 
What is SonarQube in DevOps.docx
What is SonarQube in DevOps.docxWhat is SonarQube in DevOps.docx
What is SonarQube in DevOps.docxDevOps University
 
Static Analysis with Sonarlint
Static Analysis with SonarlintStatic Analysis with Sonarlint
Static Analysis with SonarlintUT, San Antonio
 
Test driven development with sonarQube
Test driven development with sonarQubeTest driven development with sonarQube
Test driven development with sonarQubeNanthakumar Suvethan
 
OpenAPI development with Python
OpenAPI development with PythonOpenAPI development with Python
OpenAPI development with PythonTakuro Wada
 

What's hot (20)

Tech Talk #5 : Code Analysis SonarQube - Lương Trọng Nghĩa
Tech Talk #5 : Code Analysis SonarQube - Lương Trọng NghĩaTech Talk #5 : Code Analysis SonarQube - Lương Trọng Nghĩa
Tech Talk #5 : Code Analysis SonarQube - Lương Trọng Nghĩa
 
Sonarqube
SonarqubeSonarqube
Sonarqube
 
Code Quality Lightning Talk
Code Quality Lightning TalkCode Quality Lightning Talk
Code Quality Lightning Talk
 
Track code quality with SonarQube
Track code quality with SonarQubeTrack code quality with SonarQube
Track code quality with SonarQube
 
Tracking and improving software quality with SonarQube
Tracking and improving software quality with SonarQubeTracking and improving software quality with SonarQube
Tracking and improving software quality with SonarQube
 
Track code quality with SonarQube - short version
Track code quality with SonarQube - short versionTrack code quality with SonarQube - short version
Track code quality with SonarQube - short version
 
Sonar Tool - JAVA code analysis
Sonar Tool - JAVA code analysisSonar Tool - JAVA code analysis
Sonar Tool - JAVA code analysis
 
Sonar qube
Sonar qubeSonar qube
Sonar qube
 
Managing code quality with SonarQube
Managing code quality with SonarQubeManaging code quality with SonarQube
Managing code quality with SonarQube
 
SonarQube
SonarQubeSonarQube
SonarQube
 
Sonar Overview
Sonar OverviewSonar Overview
Sonar Overview
 
SonarQube - The leading platform for Continuous Code Quality
SonarQube - The leading platform for Continuous Code QualitySonarQube - The leading platform for Continuous Code Quality
SonarQube - The leading platform for Continuous Code Quality
 
Jenkins with SonarQube
Jenkins with SonarQubeJenkins with SonarQube
Jenkins with SonarQube
 
Sonar
SonarSonar
Sonar
 
Code Quality
Code QualityCode Quality
Code Quality
 
Static code analysis with sonar qube
Static code analysis with sonar qubeStatic code analysis with sonar qube
Static code analysis with sonar qube
 
What is SonarQube in DevOps.docx
What is SonarQube in DevOps.docxWhat is SonarQube in DevOps.docx
What is SonarQube in DevOps.docx
 
Static Analysis with Sonarlint
Static Analysis with SonarlintStatic Analysis with Sonarlint
Static Analysis with Sonarlint
 
Test driven development with sonarQube
Test driven development with sonarQubeTest driven development with sonarQube
Test driven development with sonarQube
 
OpenAPI development with Python
OpenAPI development with PythonOpenAPI development with Python
OpenAPI development with Python
 

Viewers also liked (20)

SONAR
SONAR SONAR
SONAR
 
Sonar
SonarSonar
Sonar
 
SONAR
SONARSONAR
SONAR
 
Sonar
SonarSonar
Sonar
 
Continuous integration using Jenkins and Sonar
Continuous integration using Jenkins and SonarContinuous integration using Jenkins and Sonar
Continuous integration using Jenkins and Sonar
 
PPT ON SOUND
PPT ON SOUNDPPT ON SOUND
PPT ON SOUND
 
Sonar
SonarSonar
Sonar
 
Sonar system
Sonar systemSonar system
Sonar system
 
Radar and sonar subbu
Radar and sonar subbuRadar and sonar subbu
Radar and sonar subbu
 
Unit tests benefits
Unit tests benefitsUnit tests benefits
Unit tests benefits
 
Ch2 structure
Ch2 structureCh2 structure
Ch2 structure
 
atmospheric boundary layer studies
atmospheric boundary layer studiesatmospheric boundary layer studies
atmospheric boundary layer studies
 
Sonar technology ppt
Sonar technology pptSonar technology ppt
Sonar technology ppt
 
The Morning Glory, Rolling Cloud
The Morning Glory, Rolling CloudThe Morning Glory, Rolling Cloud
The Morning Glory, Rolling Cloud
 
How to improve code quality for iOS apps?
How to improve code quality for iOS apps?How to improve code quality for iOS apps?
How to improve code quality for iOS apps?
 
Lapisan Batas Atmosfer
Lapisan Batas AtmosferLapisan Batas Atmosfer
Lapisan Batas Atmosfer
 
Sonar Principles Asw Analysis
Sonar Principles Asw AnalysisSonar Principles Asw Analysis
Sonar Principles Asw Analysis
 
Code Review Tool Evaluation
Code Review Tool EvaluationCode Review Tool Evaluation
Code Review Tool Evaluation
 
Sonar Metrics
Sonar MetricsSonar Metrics
Sonar Metrics
 
Sistem koordinasi (indra mata dan telinga)
Sistem koordinasi (indra mata dan telinga)Sistem koordinasi (indra mata dan telinga)
Sistem koordinasi (indra mata dan telinga)
 

Similar to Sonar Review

Parasoft .TEST, Write better C# Code Using Data Flow Analysis
Parasoft .TEST, Write better C# Code Using  Data Flow Analysis Parasoft .TEST, Write better C# Code Using  Data Flow Analysis
Parasoft .TEST, Write better C# Code Using Data Flow Analysis Engineering Software Lab
 
AWS Summit Auckland - Application Delivery Patterns for Developers
AWS Summit Auckland - Application Delivery Patterns for DevelopersAWS Summit Auckland - Application Delivery Patterns for Developers
AWS Summit Auckland - Application Delivery Patterns for DevelopersAmazon Web Services
 
6 Traits of a Successful Test Automation Architecture
6 Traits of a Successful Test Automation Architecture6 Traits of a Successful Test Automation Architecture
6 Traits of a Successful Test Automation ArchitectureErdem YILDIRIM
 
Basic software-testing-concepts
Basic software-testing-conceptsBasic software-testing-concepts
Basic software-testing-conceptsmedsherb
 
Javascript-heavy Salesforce Applications
Javascript-heavy Salesforce ApplicationsJavascript-heavy Salesforce Applications
Javascript-heavy Salesforce ApplicationsSalesforce Developers
 
Pragmatic Parallels: Java and JavaScript
Pragmatic Parallels: Java and JavaScriptPragmatic Parallels: Java and JavaScript
Pragmatic Parallels: Java and JavaScriptdavejohnson
 
The Automation Firehose: Be Strategic and Tactical by Thomas Haver
The Automation Firehose: Be Strategic and Tactical by Thomas HaverThe Automation Firehose: Be Strategic and Tactical by Thomas Haver
The Automation Firehose: Be Strategic and Tactical by Thomas HaverQA or the Highway
 
#DOAW16 - DevOps@work Roma 2016 - Testing your databases
#DOAW16 - DevOps@work Roma 2016 - Testing your databases#DOAW16 - DevOps@work Roma 2016 - Testing your databases
#DOAW16 - DevOps@work Roma 2016 - Testing your databasesAlessandro Alpi
 
PVS-Studio and static code analysis technique
PVS-Studio and static code analysis techniquePVS-Studio and static code analysis technique
PVS-Studio and static code analysis techniqueAndrey Karpov
 
The Art of Testing Less without Sacrificing Quality @ ICSE 2015
The Art of Testing Less without Sacrificing Quality @ ICSE 2015The Art of Testing Less without Sacrificing Quality @ ICSE 2015
The Art of Testing Less without Sacrificing Quality @ ICSE 2015Kim Herzig
 
Software Quality and Test Strategies for Ruby and Rails Applications
Software Quality and Test Strategies for Ruby and Rails ApplicationsSoftware Quality and Test Strategies for Ruby and Rails Applications
Software Quality and Test Strategies for Ruby and Rails ApplicationsBhavin Javia
 
How EVERFI Moved from No Automation to Continuous Test Generation in 9 Months
How EVERFI Moved from No Automation to Continuous Test Generation in 9 MonthsHow EVERFI Moved from No Automation to Continuous Test Generation in 9 Months
How EVERFI Moved from No Automation to Continuous Test Generation in 9 MonthsApplitools
 
Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)CIVEL Benoit
 
Cerberus_Presentation1
Cerberus_Presentation1Cerberus_Presentation1
Cerberus_Presentation1CIVEL Benoit
 

Similar to Sonar Review (20)

Parasoft .TEST, Write better C# Code Using Data Flow Analysis
Parasoft .TEST, Write better C# Code Using  Data Flow Analysis Parasoft .TEST, Write better C# Code Using  Data Flow Analysis
Parasoft .TEST, Write better C# Code Using Data Flow Analysis
 
AWS Summit Auckland - Application Delivery Patterns for Developers
AWS Summit Auckland - Application Delivery Patterns for DevelopersAWS Summit Auckland - Application Delivery Patterns for Developers
AWS Summit Auckland - Application Delivery Patterns for Developers
 
6 Traits of a Successful Test Automation Architecture
6 Traits of a Successful Test Automation Architecture6 Traits of a Successful Test Automation Architecture
6 Traits of a Successful Test Automation Architecture
 
CodeChecker Overview Nov 2019
CodeChecker Overview Nov 2019CodeChecker Overview Nov 2019
CodeChecker Overview Nov 2019
 
Getting Started With Testing
Getting Started With TestingGetting Started With Testing
Getting Started With Testing
 
Basic software-testing-concepts
Basic software-testing-conceptsBasic software-testing-concepts
Basic software-testing-concepts
 
Testing
TestingTesting
Testing
 
Automation Testing Syllabus - Checklist
Automation Testing Syllabus - ChecklistAutomation Testing Syllabus - Checklist
Automation Testing Syllabus - Checklist
 
Javascript-heavy Salesforce Applications
Javascript-heavy Salesforce ApplicationsJavascript-heavy Salesforce Applications
Javascript-heavy Salesforce Applications
 
Pragmatic Parallels: Java and JavaScript
Pragmatic Parallels: Java and JavaScriptPragmatic Parallels: Java and JavaScript
Pragmatic Parallels: Java and JavaScript
 
The Automation Firehose: Be Strategic and Tactical by Thomas Haver
The Automation Firehose: Be Strategic and Tactical by Thomas HaverThe Automation Firehose: Be Strategic and Tactical by Thomas Haver
The Automation Firehose: Be Strategic and Tactical by Thomas Haver
 
#DOAW16 - DevOps@work Roma 2016 - Testing your databases
#DOAW16 - DevOps@work Roma 2016 - Testing your databases#DOAW16 - DevOps@work Roma 2016 - Testing your databases
#DOAW16 - DevOps@work Roma 2016 - Testing your databases
 
PVS-Studio and static code analysis technique
PVS-Studio and static code analysis techniquePVS-Studio and static code analysis technique
PVS-Studio and static code analysis technique
 
The Art of Testing Less without Sacrificing Quality @ ICSE 2015
The Art of Testing Less without Sacrificing Quality @ ICSE 2015The Art of Testing Less without Sacrificing Quality @ ICSE 2015
The Art of Testing Less without Sacrificing Quality @ ICSE 2015
 
AAA Automated Testing
AAA Automated TestingAAA Automated Testing
AAA Automated Testing
 
Software Quality and Test Strategies for Ruby and Rails Applications
Software Quality and Test Strategies for Ruby and Rails ApplicationsSoftware Quality and Test Strategies for Ruby and Rails Applications
Software Quality and Test Strategies for Ruby and Rails Applications
 
How EVERFI Moved from No Automation to Continuous Test Generation in 9 Months
How EVERFI Moved from No Automation to Continuous Test Generation in 9 MonthsHow EVERFI Moved from No Automation to Continuous Test Generation in 9 Months
How EVERFI Moved from No Automation to Continuous Test Generation in 9 Months
 
Introduction to Parasoft C++TEST
Introduction to Parasoft C++TEST Introduction to Parasoft C++TEST
Introduction to Parasoft C++TEST
 
Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)Cerberus : Framework for Manual and Automated Testing (Web Application)
Cerberus : Framework for Manual and Automated Testing (Web Application)
 
Cerberus_Presentation1
Cerberus_Presentation1Cerberus_Presentation1
Cerberus_Presentation1
 

More from Kate Semizhon

Seven Facts about Belarus
Seven Facts about BelarusSeven Facts about Belarus
Seven Facts about BelarusKate Semizhon
 
Database Change Management
Database Change ManagementDatabase Change Management
Database Change ManagementKate Semizhon
 
Oracle ATG Commerce Overview for developers
Oracle ATG Commerce Overview for developers Oracle ATG Commerce Overview for developers
Oracle ATG Commerce Overview for developers Kate Semizhon
 
How a project is born. Intro to Discovery Phase
How a project is born. Intro to Discovery Phase How a project is born. Intro to Discovery Phase
How a project is born. Intro to Discovery Phase Kate Semizhon
 
Oracle eCommerce (ATG) Database Best Practices
Oracle eCommerce (ATG) Database  Best Practices Oracle eCommerce (ATG) Database  Best Practices
Oracle eCommerce (ATG) Database Best Practices Kate Semizhon
 
ATG Advanced Profile Management
ATG Advanced Profile ManagementATG Advanced Profile Management
ATG Advanced Profile ManagementKate Semizhon
 
SEO Instruments in ATG
SEO Instruments in ATGSEO Instruments in ATG
SEO Instruments in ATGKate Semizhon
 
Common mistakes for ATG applications that affect performance
Common mistakes for ATG applications that affect performanceCommon mistakes for ATG applications that affect performance
Common mistakes for ATG applications that affect performanceKate Semizhon
 

More from Kate Semizhon (15)

Cracking 1-on-1s
Cracking 1-on-1sCracking 1-on-1s
Cracking 1-on-1s
 
Serverless Pitfalls
Serverless PitfallsServerless Pitfalls
Serverless Pitfalls
 
Seven Facts about Belarus
Seven Facts about BelarusSeven Facts about Belarus
Seven Facts about Belarus
 
Git 101
Git 101Git 101
Git 101
 
Database Change Management
Database Change ManagementDatabase Change Management
Database Change Management
 
Ecommerce in 2018
Ecommerce in 2018Ecommerce in 2018
Ecommerce in 2018
 
ATG Best Practices
ATG Best Practices ATG Best Practices
ATG Best Practices
 
Oracle ATG Commerce Overview for developers
Oracle ATG Commerce Overview for developers Oracle ATG Commerce Overview for developers
Oracle ATG Commerce Overview for developers
 
How a project is born. Intro to Discovery Phase
How a project is born. Intro to Discovery Phase How a project is born. Intro to Discovery Phase
How a project is born. Intro to Discovery Phase
 
Oracle eCommerce (ATG) Database Best Practices
Oracle eCommerce (ATG) Database  Best Practices Oracle eCommerce (ATG) Database  Best Practices
Oracle eCommerce (ATG) Database Best Practices
 
ATG Advanced Profile Management
ATG Advanced Profile ManagementATG Advanced Profile Management
ATG Advanced Profile Management
 
SEO Instruments in ATG
SEO Instruments in ATGSEO Instruments in ATG
SEO Instruments in ATG
 
ATG pipelines
ATG pipelinesATG pipelines
ATG pipelines
 
Common mistakes for ATG applications that affect performance
Common mistakes for ATG applications that affect performanceCommon mistakes for ATG applications that affect performance
Common mistakes for ATG applications that affect performance
 
ATG Advanced RQL
ATG Advanced RQLATG Advanced RQL
ATG Advanced RQL
 

Recently uploaded

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 

Recently uploaded (20)

Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 

Sonar Review

  • 2. SONARQUBE AN OPEN SOURCE WEB APPLICATION TO MANAGE CODE QUALITY
  • 3. WHAT IS SONAR Sonar covers the 7 axes of code quality
  • 4. CONTINUOUS INSPECTION - the practice of measuring your code on a very regular basis - raises code quality visibility for all stakeholders - Continuously Improve the code quality
  • 7. CASE STUDY “There used to be numerous code-related issues that escalated over time and cost us a lot.” “SonarQube has triggered a three-fold business impact that we have seen extensively in every project team we have on-boarded – delivery excellence (time to capability reduced), engineering excellence (quality improvement) and business value (cost savings).” “A defect caught at an earlier stage in the PLC is way less expensive than one caught later on.” http://www.sonarsource.com/customers/customer-stories/ leader in networking technologies. • 73,460 employees • Q2 FY13 revenues of $12.1 billion • uses SonarQube to analyze >9 million lines of code in 90 applications
  • 8. WHY? Prevention is the best medicine
  • 9. BENEFITS Quality improvements of code produced by increasing developer knowledge and understanding of code quality issues. Reducing maintenance cost through early identification of quality issues. Reducing time that is spent on code reviews Improving the productivity of software development teams (suppress code duplication and redundancy) Automatic detection of bugs and provides an opportunity to fix them before rolling software out to production
  • 10. SONAR DASHBOARD List of projects/apps Quality metrics
  • 11. Developers 7 Deadly Sin Bugs and Potential Bugs Coding Standards Breach Duplications Lack of Unit Tests Bad Distribution of Complexity Spaghetti Design Not Enough or Too Many Comments
  • 12. KEY METRICS  Potential bugs  Potential performance problems  Potential security issues  Duplicates  Сoverage  Time machine
  • 13. POTENTIAL BUGS Return statements should not occur in finally blocks This class overrides "equals()" and should therefore also override "hashCode()” "equals(Object obj)" should be overridden along with the "compareTo(T obj)" method Thread.run() and Runnable.run() should not be called directly
  • 14. INCORRECT EXCEPTION PROCESSING Throwable and Error classes should not be caught Generic exceptions Error, RuntimeException, Throwable and Exception should never be thrown Avoid Print Stack Trace Avoid Rethrowing Exception Avoid Catching/throwing NPE Avoid Instanceof Checks In Catch Clause
  • 15. INCORRECT STRING PROCESSING name description StringInstantiation Avoid instantiating String objects; this is usually unnecessary. Inefficient String Buffering Avoid concatenating non literals in a StringBuffer constructor or append() Use Index Of Char Use String.indexOf(char) when checking for the index of a single character; it executes faster. String To String Avoid calling toString() on String objects; this is unnecessary. Useless String Value Of No need to call String.valueOf to append to a string; just use the valueOf() argument directly. String Literal Equality Checks that string literals are not used with == or !=. Unnecessary Case Change Using equalsIgnoreCase() is faster than using toUpperCase/toLowerCase().equals()
  • 16. PROCESS Set up threshold Daily reports Sonar plugin for developers to verify code Emails alerts Sprint Reports to track quality
  • 17. COST Object Cost SonarQube Free Plugins Free Sonar Installation and Configuration 1 day - DevOps Compare stats once a sprint 1h Verify new code by developers Ongoing Activities – part of the development