SlideShare a Scribd company logo
1 of 95
Johan Janssen (Info Support) @johanjanssen42
 Basic features
 Analyzing data
 Code review
 Hunting bad design and
architecture
 Testing
 Other languages
 Leftovers
 Using SonarQube on
existing projects
 Tips / summary
 Questions
 Microsoft Applications: "about 10 - 20 defects
per 1000 lines of code during in-house testing,
and 0.5 defect per 1000 lines of code in
released product (Dave Moore 1992).“
 NASA's Spirit rover became unresponsive on
January 21, 2004, a few weeks after landing on
Mars. (Wikipedia)
 In January 2009, Google's search engine
erroneously notified users that every web site
world wide was potentially malicious, including
its own. (Wikipedia)
 I’m told to use it.
 We need to achieve certain results (SIG…)
 I want to improve my coding standards
 Platform to manage code quality
 Open source, possible to pay for support and
some plugins
 Since 2006; now they have 200 customers and
SonarQube is used in 15.000 organizations
 Active community: support, plugins, books
2013:
 5 releases of SonarQube platform
 130 releases of ecosystem products
 75,000 downloads of SonarQube
 13,000+ messages on mailing lists
Profile
Rules
Projects
Projects
Quality Gates
“We all need people who will give us feedback.
That's how we improve.”
- Bill Gates
mvn clean install
mvn sonar:sonar
mvn clean org.jacoco:jacoco-maven-
plugin:prepare-agent install
-Dmaven.test.failure.ignore=true
mvn sonar:sonar
 Configure the POM (see next slide)
 Activate profile to get coverage per test
information
mvn org.jacoco:jacoco-maven-
plugin:prepare-agent clean
install -Pcoverage-per-test
 Analyze the project
mvn sonar:sonar
 ! Unit testing
 Add integration test coverage widget to
SonarQube
 Download Jacoco agent
 Configuration for Tomcat’s catalina.bat:
set JACOCO=-
javaagent:$path$libjacocoagent.jar,
destfile=$resultpath$jacoco.exec,
append=false,includes=com.dockerpi.*
set JAVA_OPTS=%JAVA_OPTS% %JACOCO%
 Start Tomcat
 Execute tests (manual, integration,
performance…)
 Stop Tomcat and execute SonarQube analysis
mvn clean install sonar:sonar
-Dsonar.dynamicAnalysis=reuseReports
-Dsonar.jacoco.itReportPath=
$resultpath$jacoco.exec
 Enable ‘Survived mutant’ rule in SonarQube
Quality Profile
 Configure Pitest for instance with Maven (see
next slides)
 Execute tests and send results to SonarQube
mvn org.pitest:pitest-
maven:mutationCoverage
mvn sonar:sonar
-Dsonar.pitest.mode=reuseReport
 Maven configuration inside the build/plugins
section
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>LATEST</version>
<configuration>
<inScopeClasses>
<param>com.example*</param>
</inScopeClasses>
<targetClasses>
<param>com.example*</param>
</targetClasses>
<outputFormats>
<outputFormat>XML</outputFormat>
</outputFormats>
mvn sonar:sonar -Dsonar.branch=4.4
 Ignore files
 Ignore issues
 Ignore duplications
 Ignore code coverage
 Example:
mvn sonar:sonar -Dsonar.exclusions=
src/main/webapp/lib/*.js
 Identity hotspots
 Use action plans
 Maybe use a less strict quality profile
 Add tasks/stories in the sprint to improve quality
 Monitor quality of new code
 Create stories/tasks to improve the quality
 Perform manual code reviews
 Agree on a standard for items SonarQube
cannot check
 Fix items or mark them as false positive
 Use separate logins
 Settings/reviews are project specific
 Options to use SonarQube
o Central server (commit AND nightly)
o IDE plugin
o Local in your development environment
 Check code quality before ‘To verify’ step
o First merge your code so it is up to date
 Verifier should also verify the quality
“Once we accept our limits, we go beyond them.”
- Albert Einstein
 Ask me!
 Sonarqube.org
 Nemo example dashboard
 SonarQube books
johan.janssen@infosupport.com
@johanjanssen42

More Related Content

What's hot

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)
 
Sonar qube to impove code quality
Sonar qube   to impove code qualitySonar qube   to impove code quality
Sonar qube to impove code qualityMani Sarkar
 
Managing code quality with SonarQube - Radu Vunvulea
Managing code quality with SonarQube - Radu VunvuleaManaging code quality with SonarQube - Radu Vunvulea
Managing code quality with SonarQube - Radu VunvuleaITSpark Community
 
Static code analysis
Static code analysisStatic code analysis
Static code analysisPrancer Io
 
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
 
Java Source Code Analysis using SonarQube
Java Source Code Analysis using SonarQubeJava Source Code Analysis using SonarQube
Java Source Code Analysis using SonarQubeAngelin R
 
Pay off your technical debt with SonarQube
Pay off your technical debt with SonarQubePay off your technical debt with SonarQube
Pay off your technical debt with SonarQubeRik van den Berg
 
Java Code Quality Tools
Java Code Quality ToolsJava Code Quality Tools
Java Code Quality ToolsAnju ML
 
SonarQube: Continuous Code Inspection
SonarQube: Continuous Code InspectionSonarQube: Continuous Code Inspection
SonarQube: Continuous Code InspectionMichael Jesse
 
Continuous Inspection of Code Quality: SonarQube
Continuous Inspection of Code Quality: SonarQubeContinuous Inspection of Code Quality: SonarQube
Continuous Inspection of Code Quality: SonarQubeEmre Dündar
 
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
 
ITAKE Unconference - Holding down your technical debt with Sonarqube
ITAKE Unconference - Holding down your technical debt with SonarqubeITAKE Unconference - Holding down your technical debt with Sonarqube
ITAKE Unconference - Holding down your technical debt with SonarqubePatroklos Papapetrou (Pat)
 
Sonarqube
SonarqubeSonarqube
SonarqubeKalkey
 
SonarQube와 함께하는 소프트웨어 품질 세미나 - 지속적인 코드 인스펙션 SonarQube 활용 방안
SonarQube와 함께하는 소프트웨어 품질 세미나 - 지속적인 코드 인스펙션 SonarQube 활용 방안SonarQube와 함께하는 소프트웨어 품질 세미나 - 지속적인 코드 인스펙션 SonarQube 활용 방안
SonarQube와 함께하는 소프트웨어 품질 세미나 - 지속적인 코드 인스펙션 SonarQube 활용 방안CURVC Corp
 

What's hot (20)

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
 
Sonar qube to impove code quality
Sonar qube   to impove code qualitySonar qube   to impove code quality
Sonar qube to impove code quality
 
Managing code quality with SonarQube - Radu Vunvulea
Managing code quality with SonarQube - Radu VunvuleaManaging code quality with SonarQube - Radu Vunvulea
Managing code quality with SonarQube - Radu Vunvulea
 
Static code analysis
Static code analysisStatic code analysis
Static code analysis
 
SonarQube
SonarQubeSonarQube
SonarQube
 
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
 
Sonar
SonarSonar
Sonar
 
Java Source Code Analysis using SonarQube
Java Source Code Analysis using SonarQubeJava Source Code Analysis using SonarQube
Java Source Code Analysis using SonarQube
 
Pay off your technical debt with SonarQube
Pay off your technical debt with SonarQubePay off your technical debt with SonarQube
Pay off your technical debt with SonarQube
 
Sonarqube + Docker
Sonarqube + DockerSonarqube + Docker
Sonarqube + Docker
 
Java Code Quality Tools
Java Code Quality ToolsJava Code Quality Tools
Java Code Quality Tools
 
SonarQube: Continuous Code Inspection
SonarQube: Continuous Code InspectionSonarQube: Continuous Code Inspection
SonarQube: Continuous Code Inspection
 
Sonar
SonarSonar
Sonar
 
Sonar Review
Sonar ReviewSonar Review
Sonar Review
 
Track code quality with SonarQube
Track code quality with SonarQubeTrack code quality with SonarQube
Track code quality with SonarQube
 
Continuous Inspection of Code Quality: SonarQube
Continuous Inspection of Code Quality: SonarQubeContinuous Inspection of Code Quality: SonarQube
Continuous Inspection of Code Quality: 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
 
ITAKE Unconference - Holding down your technical debt with Sonarqube
ITAKE Unconference - Holding down your technical debt with SonarqubeITAKE Unconference - Holding down your technical debt with Sonarqube
ITAKE Unconference - Holding down your technical debt with Sonarqube
 
Sonarqube
SonarqubeSonarqube
Sonarqube
 
SonarQube와 함께하는 소프트웨어 품질 세미나 - 지속적인 코드 인스펙션 SonarQube 활용 방안
SonarQube와 함께하는 소프트웨어 품질 세미나 - 지속적인 코드 인스펙션 SonarQube 활용 방안SonarQube와 함께하는 소프트웨어 품질 세미나 - 지속적인 코드 인스펙션 SonarQube 활용 방안
SonarQube와 함께하는 소프트웨어 품질 세미나 - 지속적인 코드 인스펙션 SonarQube 활용 방안
 

Viewers also liked

Java Code Quality Tools
Java Code Quality ToolsJava Code Quality Tools
Java Code Quality ToolsOrest Ivasiv
 
Java. Полиморфизм.
Java. Полиморфизм.Java. Полиморфизм.
Java. Полиморфизм.Unguryan Vitaliy
 
Java. Конструкторы класса и инициализация
Java. Конструкторы класса и инициализация Java. Конструкторы класса и инициализация
Java. Конструкторы класса и инициализация Unguryan Vitaliy
 
Java. Инкапсуляция.
Java. Инкапсуляция.Java. Инкапсуляция.
Java. Инкапсуляция.Unguryan Vitaliy
 
Java. Наследование.
Java. Наследование.Java. Наследование.
Java. Наследование.Unguryan Vitaliy
 
Just-in-time compiler (March, 2017)
Just-in-time compiler (March, 2017)Just-in-time compiler (March, 2017)
Just-in-time compiler (March, 2017)Rachel M. Carmena
 

Viewers also liked (8)

SonarQube Overview
SonarQube OverviewSonarQube Overview
SonarQube Overview
 
Java Code Quality Tools
Java Code Quality ToolsJava Code Quality Tools
Java Code Quality Tools
 
Java. Полиморфизм.
Java. Полиморфизм.Java. Полиморфизм.
Java. Полиморфизм.
 
Java. Конструкторы класса и инициализация
Java. Конструкторы класса и инициализация Java. Конструкторы класса и инициализация
Java. Конструкторы класса и инициализация
 
Java. Инкапсуляция.
Java. Инкапсуляция.Java. Инкапсуляция.
Java. Инкапсуляция.
 
Java. Наследование.
Java. Наследование.Java. Наследование.
Java. Наследование.
 
Just-in-time compiler (March, 2017)
Just-in-time compiler (March, 2017)Just-in-time compiler (March, 2017)
Just-in-time compiler (March, 2017)
 
SONAR
SONAR SONAR
SONAR
 

Similar to Beyond the basics of SonarQube: improve your Java(Script) code even further

The Usual Suspects - Red Hat Developer Day 2012-11-01
The Usual Suspects - Red Hat Developer Day 2012-11-01The Usual Suspects - Red Hat Developer Day 2012-11-01
The Usual Suspects - Red Hat Developer Day 2012-11-01Jorge Hidalgo
 
Object Oriented Programming-JAVA
Object Oriented Programming-JAVAObject Oriented Programming-JAVA
Object Oriented Programming-JAVAHome
 
[JOI] TOTVS Developers Joinville - Java #1
[JOI] TOTVS Developers Joinville - Java #1[JOI] TOTVS Developers Joinville - Java #1
[JOI] TOTVS Developers Joinville - Java #1Rubens Dos Santos Filho
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsAmazon Web Services
 
Keynote VST2020 (Workshop on Validation, Analysis and Evolution of Software ...
Keynote VST2020 (Workshop on  Validation, Analysis and Evolution of Software ...Keynote VST2020 (Workshop on  Validation, Analysis and Evolution of Software ...
Keynote VST2020 (Workshop on Validation, Analysis and Evolution of Software ...University of Antwerp
 
Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2Matthew McCullough
 
Drools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentationDrools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentationMark Proctor
 
Java Attacks & Defenses - End of Year 2010 Presentation
Java Attacks & Defenses - End of Year 2010 PresentationJava Attacks & Defenses - End of Year 2010 Presentation
Java Attacks & Defenses - End of Year 2010 PresentationJames Hamilton
 
java:characteristics, classpath, compliation
java:characteristics, classpath, compliationjava:characteristics, classpath, compliation
java:characteristics, classpath, compliationShivam Singhal
 
Java Insecurity: How to Deal with the Constant Vulnerabilities
Java Insecurity: How to Deal with the Constant VulnerabilitiesJava Insecurity: How to Deal with the Constant Vulnerabilities
Java Insecurity: How to Deal with the Constant VulnerabilitiesLumension
 
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"Daniel Bryant
 
Automated Abstraction of Flow of Control in a System of Distributed Software...
Automated Abstraction of Flow of Control in a System of Distributed  Software...Automated Abstraction of Flow of Control in a System of Distributed  Software...
Automated Abstraction of Flow of Control in a System of Distributed Software...nimak
 
Ranjith kumar Nagisetty(AndiordApp and PostSiliconTest Engineer)_Resume
Ranjith kumar Nagisetty(AndiordApp and PostSiliconTest Engineer)_ResumeRanjith kumar Nagisetty(AndiordApp and PostSiliconTest Engineer)_Resume
Ranjith kumar Nagisetty(AndiordApp and PostSiliconTest Engineer)_Resumeranjith nagisetty
 
Java code coverage with JCov. Implementation details and use cases.
Java code coverage with JCov. Implementation details and use cases.Java code coverage with JCov. Implementation details and use cases.
Java code coverage with JCov. Implementation details and use cases.Alexandre (Shura) Iline
 

Similar to Beyond the basics of SonarQube: improve your Java(Script) code even further (20)

JavaCro'15 - Beyond the basics of SonarQube improve your Java(Script) code ev...
JavaCro'15 - Beyond the basics of SonarQube improve your Java(Script) code ev...JavaCro'15 - Beyond the basics of SonarQube improve your Java(Script) code ev...
JavaCro'15 - Beyond the basics of SonarQube improve your Java(Script) code ev...
 
The Usual Suspects - Red Hat Developer Day 2012-11-01
The Usual Suspects - Red Hat Developer Day 2012-11-01The Usual Suspects - Red Hat Developer Day 2012-11-01
The Usual Suspects - Red Hat Developer Day 2012-11-01
 
Maven.pptx
Maven.pptxMaven.pptx
Maven.pptx
 
Object Oriented Programming-JAVA
Object Oriented Programming-JAVAObject Oriented Programming-JAVA
Object Oriented Programming-JAVA
 
Migrating Beyond Java 8
Migrating Beyond Java 8Migrating Beyond Java 8
Migrating Beyond Java 8
 
Bye flex. Hey js.
Bye flex. Hey js.Bye flex. Hey js.
Bye flex. Hey js.
 
[JOI] TOTVS Developers Joinville - Java #1
[JOI] TOTVS Developers Joinville - Java #1[JOI] TOTVS Developers Joinville - Java #1
[JOI] TOTVS Developers Joinville - Java #1
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Core Java
Core JavaCore Java
Core Java
 
Keynote VST2020 (Workshop on Validation, Analysis and Evolution of Software ...
Keynote VST2020 (Workshop on  Validation, Analysis and Evolution of Software ...Keynote VST2020 (Workshop on  Validation, Analysis and Evolution of Software ...
Keynote VST2020 (Workshop on Validation, Analysis and Evolution of Software ...
 
Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2Google App Engine for Java v0.0.2
Google App Engine for Java v0.0.2
 
Drools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentationDrools, jBPM OptaPlanner presentation
Drools, jBPM OptaPlanner presentation
 
Java Attacks & Defenses - End of Year 2010 Presentation
Java Attacks & Defenses - End of Year 2010 PresentationJava Attacks & Defenses - End of Year 2010 Presentation
Java Attacks & Defenses - End of Year 2010 Presentation
 
java:characteristics, classpath, compliation
java:characteristics, classpath, compliationjava:characteristics, classpath, compliation
java:characteristics, classpath, compliation
 
ConSol_IBM_webcast_quarkus_the_blue_hedgehog_of_java_web_frameworks
ConSol_IBM_webcast_quarkus_the_blue_hedgehog_of_java_web_frameworksConSol_IBM_webcast_quarkus_the_blue_hedgehog_of_java_web_frameworks
ConSol_IBM_webcast_quarkus_the_blue_hedgehog_of_java_web_frameworks
 
Java Insecurity: How to Deal with the Constant Vulnerabilities
Java Insecurity: How to Deal with the Constant VulnerabilitiesJava Insecurity: How to Deal with the Constant Vulnerabilities
Java Insecurity: How to Deal with the Constant Vulnerabilities
 
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
J1 2015 "Debugging Java Apps in Containers: No Heavy Welding Gear Required"
 
Automated Abstraction of Flow of Control in a System of Distributed Software...
Automated Abstraction of Flow of Control in a System of Distributed  Software...Automated Abstraction of Flow of Control in a System of Distributed  Software...
Automated Abstraction of Flow of Control in a System of Distributed Software...
 
Ranjith kumar Nagisetty(AndiordApp and PostSiliconTest Engineer)_Resume
Ranjith kumar Nagisetty(AndiordApp and PostSiliconTest Engineer)_ResumeRanjith kumar Nagisetty(AndiordApp and PostSiliconTest Engineer)_Resume
Ranjith kumar Nagisetty(AndiordApp and PostSiliconTest Engineer)_Resume
 
Java code coverage with JCov. Implementation details and use cases.
Java code coverage with JCov. Implementation details and use cases.Java code coverage with JCov. Implementation details and use cases.
Java code coverage with JCov. Implementation details and use cases.
 

More from Johan Janssen

How and why to upgrade to java 16 or 17
How and why to upgrade to java 16 or 17How and why to upgrade to java 16 or 17
How and why to upgrade to java 16 or 17Johan Janssen
 
Upgrade to java 16 or 17
Upgrade to java 16 or 17Upgrade to java 16 or 17
Upgrade to java 16 or 17Johan Janssen
 
Continuous delivery in 50 minutes
Continuous delivery in 50 minutesContinuous delivery in 50 minutes
Continuous delivery in 50 minutesJohan Janssen
 
Create a Continuous Delivery Pipeline in 45 minutes
Create a Continuous Delivery Pipeline in 45 minutesCreate a Continuous Delivery Pipeline in 45 minutes
Create a Continuous Delivery Pipeline in 45 minutesJohan Janssen
 
DevNexus: Create a Continuous Delivery pipeline in 50 minutes
DevNexus: Create a Continuous Delivery pipeline in 50 minutesDevNexus: Create a Continuous Delivery pipeline in 50 minutes
DevNexus: Create a Continuous Delivery pipeline in 50 minutesJohan Janssen
 
Rest no more - Using actors for the internet of (Lego) trains & Raspberry Pi's
Rest no more - Using actors for the internet of (Lego) trains & Raspberry Pi'sRest no more - Using actors for the internet of (Lego) trains & Raspberry Pi's
Rest no more - Using actors for the internet of (Lego) trains & Raspberry Pi'sJohan Janssen
 
How we started our first java conference JVMCON
How we started our first java conference JVMCONHow we started our first java conference JVMCON
How we started our first java conference JVMCONJohan Janssen
 
Use voice recognition with Alexa to control your home [JavaOne]
Use voice recognition with Alexa to control your home [JavaOne]Use voice recognition with Alexa to control your home [JavaOne]
Use voice recognition with Alexa to control your home [JavaOne]Johan Janssen
 
Docker for Java developers at JavaLand
Docker for Java developers at JavaLandDocker for Java developers at JavaLand
Docker for Java developers at JavaLandJohan Janssen
 
Welcome alexa, your personal assistant
Welcome alexa, your personal assistantWelcome alexa, your personal assistant
Welcome alexa, your personal assistantJohan Janssen
 
A tour of (advanced) Akka features in 40 minutes
A tour of (advanced) Akka features in 40 minutesA tour of (advanced) Akka features in 40 minutes
A tour of (advanced) Akka features in 40 minutesJohan Janssen
 
Continuous delivery with docker
Continuous delivery with dockerContinuous delivery with docker
Continuous delivery with dockerJohan Janssen
 
EuregJUG: Using actors for the internet of (lego) trains
EuregJUG: Using actors for the internet of (lego) trainsEuregJUG: Using actors for the internet of (lego) trains
EuregJUG: Using actors for the internet of (lego) trainsJohan Janssen
 
JavaOne: Welcome alexa, your personal assistant [con1700]
JavaOne: Welcome alexa, your personal assistant [con1700]JavaOne: Welcome alexa, your personal assistant [con1700]
JavaOne: Welcome alexa, your personal assistant [con1700]Johan Janssen
 
JavaOne: Using actors for the iInternet of (Lego) Trains [con1709]
JavaOne: Using actors for the iInternet of (Lego) Trains [con1709]JavaOne: Using actors for the iInternet of (Lego) Trains [con1709]
JavaOne: Using actors for the iInternet of (Lego) Trains [con1709]Johan Janssen
 
JavaOne: Using NetBeans RCP to control your Lego [con1702]
JavaOne: Using NetBeans RCP to control your Lego [con1702]JavaOne: Using NetBeans RCP to control your Lego [con1702]
JavaOne: Using NetBeans RCP to control your Lego [con1702]Johan Janssen
 
JavaOne: A tour of (advanced) akka features in 60 minutes [con1706]
JavaOne: A tour of (advanced) akka features in 60 minutes [con1706]JavaOne: A tour of (advanced) akka features in 60 minutes [con1706]
JavaOne: A tour of (advanced) akka features in 60 minutes [con1706]Johan Janssen
 
Hide your development environment and application in a container
Hide your development environment and application in a containerHide your development environment and application in a container
Hide your development environment and application in a containerJohan Janssen
 

More from Johan Janssen (18)

How and why to upgrade to java 16 or 17
How and why to upgrade to java 16 or 17How and why to upgrade to java 16 or 17
How and why to upgrade to java 16 or 17
 
Upgrade to java 16 or 17
Upgrade to java 16 or 17Upgrade to java 16 or 17
Upgrade to java 16 or 17
 
Continuous delivery in 50 minutes
Continuous delivery in 50 minutesContinuous delivery in 50 minutes
Continuous delivery in 50 minutes
 
Create a Continuous Delivery Pipeline in 45 minutes
Create a Continuous Delivery Pipeline in 45 minutesCreate a Continuous Delivery Pipeline in 45 minutes
Create a Continuous Delivery Pipeline in 45 minutes
 
DevNexus: Create a Continuous Delivery pipeline in 50 minutes
DevNexus: Create a Continuous Delivery pipeline in 50 minutesDevNexus: Create a Continuous Delivery pipeline in 50 minutes
DevNexus: Create a Continuous Delivery pipeline in 50 minutes
 
Rest no more - Using actors for the internet of (Lego) trains & Raspberry Pi's
Rest no more - Using actors for the internet of (Lego) trains & Raspberry Pi'sRest no more - Using actors for the internet of (Lego) trains & Raspberry Pi's
Rest no more - Using actors for the internet of (Lego) trains & Raspberry Pi's
 
How we started our first java conference JVMCON
How we started our first java conference JVMCONHow we started our first java conference JVMCON
How we started our first java conference JVMCON
 
Use voice recognition with Alexa to control your home [JavaOne]
Use voice recognition with Alexa to control your home [JavaOne]Use voice recognition with Alexa to control your home [JavaOne]
Use voice recognition with Alexa to control your home [JavaOne]
 
Docker for Java developers at JavaLand
Docker for Java developers at JavaLandDocker for Java developers at JavaLand
Docker for Java developers at JavaLand
 
Welcome alexa, your personal assistant
Welcome alexa, your personal assistantWelcome alexa, your personal assistant
Welcome alexa, your personal assistant
 
A tour of (advanced) Akka features in 40 minutes
A tour of (advanced) Akka features in 40 minutesA tour of (advanced) Akka features in 40 minutes
A tour of (advanced) Akka features in 40 minutes
 
Continuous delivery with docker
Continuous delivery with dockerContinuous delivery with docker
Continuous delivery with docker
 
EuregJUG: Using actors for the internet of (lego) trains
EuregJUG: Using actors for the internet of (lego) trainsEuregJUG: Using actors for the internet of (lego) trains
EuregJUG: Using actors for the internet of (lego) trains
 
JavaOne: Welcome alexa, your personal assistant [con1700]
JavaOne: Welcome alexa, your personal assistant [con1700]JavaOne: Welcome alexa, your personal assistant [con1700]
JavaOne: Welcome alexa, your personal assistant [con1700]
 
JavaOne: Using actors for the iInternet of (Lego) Trains [con1709]
JavaOne: Using actors for the iInternet of (Lego) Trains [con1709]JavaOne: Using actors for the iInternet of (Lego) Trains [con1709]
JavaOne: Using actors for the iInternet of (Lego) Trains [con1709]
 
JavaOne: Using NetBeans RCP to control your Lego [con1702]
JavaOne: Using NetBeans RCP to control your Lego [con1702]JavaOne: Using NetBeans RCP to control your Lego [con1702]
JavaOne: Using NetBeans RCP to control your Lego [con1702]
 
JavaOne: A tour of (advanced) akka features in 60 minutes [con1706]
JavaOne: A tour of (advanced) akka features in 60 minutes [con1706]JavaOne: A tour of (advanced) akka features in 60 minutes [con1706]
JavaOne: A tour of (advanced) akka features in 60 minutes [con1706]
 
Hide your development environment and application in a container
Hide your development environment and application in a containerHide your development environment and application in a container
Hide your development environment and application in a container
 

Recently uploaded

Al Barsha Night Partner +0567686026 Call Girls Dubai
Al Barsha Night Partner +0567686026 Call Girls  DubaiAl Barsha Night Partner +0567686026 Call Girls  Dubai
Al Barsha Night Partner +0567686026 Call Girls DubaiEscorts Call Girls
 
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...roncy bisnoi
 
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceBusty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceDelhi Call girls
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirtrahman018755
 
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋nirzagarg
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLimonikaupta
 
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...SUHANI PANDEY
 
Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftAanSulistiyo
 
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...tanu pandey
 
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...nilamkumrai
 
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...SUHANI PANDEY
 
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...SUHANI PANDEY
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"growthgrids
 
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...SUHANI PANDEY
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445ruhi
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...Neha Pandey
 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...SUHANI PANDEY
 

Recently uploaded (20)

Al Barsha Night Partner +0567686026 Call Girls Dubai
Al Barsha Night Partner +0567686026 Call Girls  DubaiAl Barsha Night Partner +0567686026 Call Girls  Dubai
Al Barsha Night Partner +0567686026 Call Girls Dubai
 
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
 
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort ServiceBusty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
 
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Prashant Vihar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
 
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
 
Microsoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck MicrosoftMicrosoft Azure Arc Customer Deck Microsoft
Microsoft Azure Arc Customer Deck Microsoft
 
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...Katraj ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For S...
Katraj ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For S...
 
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
( Pune ) VIP Pimpri Chinchwad Call Girls 🎗️ 9352988975 Sizzling | Escorts | G...
 
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
 
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
 

Beyond the basics of SonarQube: improve your Java(Script) code even further

  • 1. Johan Janssen (Info Support) @johanjanssen42
  • 2.  Basic features  Analyzing data  Code review  Hunting bad design and architecture  Testing  Other languages  Leftovers  Using SonarQube on existing projects  Tips / summary  Questions
  • 3.
  • 4.
  • 5.
  • 6.  Microsoft Applications: "about 10 - 20 defects per 1000 lines of code during in-house testing, and 0.5 defect per 1000 lines of code in released product (Dave Moore 1992).“
  • 7.  NASA's Spirit rover became unresponsive on January 21, 2004, a few weeks after landing on Mars. (Wikipedia)  In January 2009, Google's search engine erroneously notified users that every web site world wide was potentially malicious, including its own. (Wikipedia)
  • 8.
  • 9.  I’m told to use it.  We need to achieve certain results (SIG…)  I want to improve my coding standards
  • 10.  Platform to manage code quality  Open source, possible to pay for support and some plugins  Since 2006; now they have 200 customers and SonarQube is used in 15.000 organizations  Active community: support, plugins, books
  • 11. 2013:  5 releases of SonarQube platform  130 releases of ecosystem products  75,000 downloads of SonarQube  13,000+ messages on mailing lists
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 26.
  • 27.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41. “We all need people who will give us feedback. That's how we improve.” - Bill Gates
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47. mvn clean install mvn sonar:sonar mvn clean org.jacoco:jacoco-maven- plugin:prepare-agent install -Dmaven.test.failure.ignore=true mvn sonar:sonar
  • 48.  Configure the POM (see next slide)  Activate profile to get coverage per test information mvn org.jacoco:jacoco-maven- plugin:prepare-agent clean install -Pcoverage-per-test  Analyze the project mvn sonar:sonar
  • 49.
  • 50.
  • 51.
  • 52.  ! Unit testing
  • 53.
  • 54.
  • 55.
  • 56.  Add integration test coverage widget to SonarQube  Download Jacoco agent  Configuration for Tomcat’s catalina.bat: set JACOCO=- javaagent:$path$libjacocoagent.jar, destfile=$resultpath$jacoco.exec, append=false,includes=com.dockerpi.* set JAVA_OPTS=%JAVA_OPTS% %JACOCO%
  • 57.  Start Tomcat  Execute tests (manual, integration, performance…)  Stop Tomcat and execute SonarQube analysis mvn clean install sonar:sonar -Dsonar.dynamicAnalysis=reuseReports -Dsonar.jacoco.itReportPath= $resultpath$jacoco.exec
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.  Enable ‘Survived mutant’ rule in SonarQube Quality Profile  Configure Pitest for instance with Maven (see next slides)
  • 63.  Execute tests and send results to SonarQube mvn org.pitest:pitest- maven:mutationCoverage mvn sonar:sonar -Dsonar.pitest.mode=reuseReport
  • 64.  Maven configuration inside the build/plugins section <plugin> <groupId>org.pitest</groupId> <artifactId>pitest-maven</artifactId> <version>LATEST</version> <configuration> <inScopeClasses> <param>com.example*</param> </inScopeClasses> <targetClasses> <param>com.example*</param> </targetClasses> <outputFormats> <outputFormat>XML</outputFormat> </outputFormats>
  • 65.
  • 66.
  • 67.
  • 68.
  • 69.
  • 70.
  • 71.
  • 72.
  • 74.  Ignore files  Ignore issues  Ignore duplications  Ignore code coverage  Example: mvn sonar:sonar -Dsonar.exclusions= src/main/webapp/lib/*.js
  • 75.
  • 76.
  • 77.
  • 78.
  • 79.
  • 80.
  • 81.
  • 82.
  • 83.
  • 84.
  • 85.
  • 86.  Identity hotspots  Use action plans  Maybe use a less strict quality profile  Add tasks/stories in the sprint to improve quality  Monitor quality of new code
  • 87.
  • 88.
  • 89.
  • 90.
  • 91.  Create stories/tasks to improve the quality  Perform manual code reviews  Agree on a standard for items SonarQube cannot check  Fix items or mark them as false positive  Use separate logins  Settings/reviews are project specific
  • 92.  Options to use SonarQube o Central server (commit AND nightly) o IDE plugin o Local in your development environment  Check code quality before ‘To verify’ step o First merge your code so it is up to date  Verifier should also verify the quality
  • 93.
  • 94. “Once we accept our limits, we go beyond them.” - Albert Einstein
  • 95.  Ask me!  Sonarqube.org  Nemo example dashboard  SonarQube books johan.janssen@infosupport.com @johanjanssen42

Editor's Notes

  1. Source: http://www.unix-ag.uni-kl.de/~guenther/images/failure-small.jpg
  2. Source: http://eugenedvorkin.com/wp-content/gallery/cache/220__320x240_code_reviews.jpg
  3. Package tangle index and duplications from Jenkins
  4. Package tangle index and duplications from Jenkins