johan janssen (info support) @johanjanssen42. sonarqube basic features analyzing data code review...
TRANSCRIPT
![Page 1: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/1.jpg)
Beyond the basics of SonarQube
Improve your Java(Script) even
furtherJohan Janssen (Info Support) @johanjanssen42
![Page 2: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/2.jpg)
Agenda SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing Other languages Plugins Using SonarQube on existing projects Tips / summary Questions
![Page 3: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/3.jpg)
Quality for thousands of years
![Page 4: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/4.jpg)
Quality after years of improvements
![Page 5: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/5.jpg)
Quality for 39 days
![Page 6: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/6.jpg)
Bugs 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).“
![Page 7: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/7.jpg)
Bugs 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)
![Page 8: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/8.jpg)
Find them as fast as possible
![Page 9: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/9.jpg)
Why should I use SonarQube?
I’m told to use it. We need to achieve certain results (SIG…) I want to improve my coding standards
![Page 10: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/10.jpg)
SonarQube 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
![Page 11: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/11.jpg)
SonarQube
2013: 5 releases of SonarQube platform 130 releases of ecosystem products 75,000 downloads of SonarQube 13,000+ messages on mailing lists
![Page 12: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/12.jpg)
SonarQube architecture
![Page 13: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/13.jpg)
SonarQube basic features
![Page 14: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/14.jpg)
![Page 15: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/15.jpg)
Dashboard with ‘time changes’
![Page 16: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/16.jpg)
Configure dashboards
![Page 17: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/17.jpg)
Configure dashboards
![Page 18: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/18.jpg)
![Page 19: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/19.jpg)
![Page 20: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/20.jpg)
Quality Gates
![Page 21: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/21.jpg)
Notifications
![Page 22: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/22.jpg)
Analysing data
![Page 23: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/23.jpg)
Compare
![Page 24: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/24.jpg)
Measures
![Page 25: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/25.jpg)
Measure Filter as Bubble Chart
![Page 26: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/26.jpg)
Filter Motion Chart
![Page 27: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/27.jpg)
What is good code?
![Page 28: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/28.jpg)
Code review
![Page 29: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/29.jpg)
Roles
![Page 30: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/30.jpg)
Add code review
![Page 31: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/31.jpg)
Why code reviews?
“We all need people who will give us feedback. That's how we improve.”
- Bill Gates
![Page 32: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/32.jpg)
Hunting bad design and architecture
![Page 33: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/33.jpg)
Hunting bad design and architecture
![Page 34: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/34.jpg)
Architectural constraints
![Page 35: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/35.jpg)
Architectural constraints
![Page 36: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/36.jpg)
Package tangle index
![Page 37: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/37.jpg)
Package tangle index
![Page 38: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/38.jpg)
Testing
![Page 39: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/39.jpg)
Now manual execution of unit tests
mvn clean installmvn sonar:sonar
mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install
-Dmaven.test.failure.ignore=truemvn sonar:sonar
![Page 40: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/40.jpg)
Coverage per test
![Page 41: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/41.jpg)
Coverage per test Configure the POM (see next slide) Activate profile to get coverage per test
informationmvn org.jacoco:jacoco-maven-
plugin:prepare-agent clean
install -Pcoverage-per-test Analyze the project
mvn sonar:sonar
![Page 42: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/42.jpg)
![Page 43: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/43.jpg)
Coverage per test workspace
![Page 44: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/44.jpg)
Integration testing
![Page 45: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/45.jpg)
Integration testing Add integration test coverage widget to
SonarQube Download Jacoco agent Configuration for Tomcat’s catalina.bat:set JACOCO=-javaagent:$path$\lib\jacocoagent.jar,destfile=$resultpath$\jacoco.exec,append=false,includes=com.dockerpi.*set JAVA_OPTS=%JAVA_OPTS% %JACOCO%
![Page 46: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/46.jpg)
Integration testing Start Tomcat Execute tests (manual, integration,
performance…) Stop Tomcat and execute SonarQube
analysismvn clean install sonar:sonar
-Dsonar.dynamicAnalysis=reuseReports
-Dsonar.jacoco.itReportPath=$resultpath$\jacoco.exec
![Page 47: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/47.jpg)
Unit and integration testing combined
![Page 48: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/48.jpg)
PMD rules for unit testing
![Page 49: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/49.jpg)
PMD rules for unit testing
![Page 50: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/50.jpg)
PMD rules for unit testing
![Page 51: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/51.jpg)
![Page 52: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/52.jpg)
Other languages
![Page 53: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/53.jpg)
JavaScript
![Page 54: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/54.jpg)
JavaScript
![Page 55: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/55.jpg)
CSS
![Page 56: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/56.jpg)
CSS
![Page 57: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/57.jpg)
Web plugin
![Page 58: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/58.jpg)
Plugins
![Page 59: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/59.jpg)
Pitest plugin
![Page 60: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/60.jpg)
Pitest plugin Enable ‘Survived mutant’ rule in
SonarQube Quality Profile Configure Pitest for instance with Maven
(see next slides)
![Page 61: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/61.jpg)
Pitest plugin Execute tests and send results to
SonarQubemvn org.pitest:pitest-maven:mutationCoveragemvn sonar:sonar
-Dsonar.pitest.mode=reuseReport
![Page 62: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/62.jpg)
Pitest plugin
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> </configuration></plugin>
![Page 63: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/63.jpg)
Pitest plugin
![Page 64: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/64.jpg)
Build breaker plugin[INFO] [15:15:57.671] Executing post-job class org.sonar.plugins.buildbreaker.AlertBreaker[ERROR] [15:15:57.673] [BUILD BREAKER] Coverage < 80[ERROR] [15:15:57.673] [BUILD BREAKER] Critical issues > 0[ERROR] [15:15:57.673] [BUILD BREAKER] Major issues > 0[ERROR] Alert thresholds have been hit (3 times).[INFO] ------------------------------------------------------------------------[INFO] BUILD FAILURE[INFO] ------------------------------------------------------------------------[INFO] Total time: 8.169s[INFO] Finished at: Sat Aug 30 15:15:57 CEST 2014[INFO] Final Memory: 21M/234M[INFO] ------------------------------------------------------------------------[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.4:sonar (default-cli) on project DockerPiExample: Alert thresholds have been hit (3 times)
![Page 65: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/65.jpg)
(Eclipse) IDE integration Supports incremental analyses (default) Install plugin through Eclipse Marketplace Configure SonarQube server:
o Window -> Preferences -> SonarQube -> Servers
o Right click on your project in the Project Explorer
o Configure -> Associate with SonarQube
![Page 66: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/66.jpg)
Eclipse SonarQube Issues
![Page 67: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/67.jpg)
Eclipse SonarQube Issues Editor
![Page 68: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/68.jpg)
Eclipse SonarQube Web Browser
![Page 69: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/69.jpg)
SCM Activity plugin
![Page 70: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/70.jpg)
Build Stability plugin
![Page 71: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/71.jpg)
Build Stability plugin
![Page 72: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/72.jpg)
Tab metrics plugin
![Page 73: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/73.jpg)
Mojo Bridge Plugin (Development)
![Page 74: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/74.jpg)
Mojo Bridge Plugin (Development)
![Page 75: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/75.jpg)
Leftovers
![Page 76: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/76.jpg)
Libraries
![Page 77: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/77.jpg)
Branches mvn sonar:sonar -Dsonar.branch=4.4
![Page 78: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/78.jpg)
Exclusions
Ignore files Ignore issues Ignore duplications Ignore code coverage Example:mvn sonar:sonar -Dsonar.exclusions=
src/main/webapp/lib/*.js
![Page 79: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/79.jpg)
Duplications across projects
![Page 80: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/80.jpg)
Duplications across projects
![Page 81: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/81.jpg)
Complexity
![Page 82: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/82.jpg)
Technical debt pyramid
![Page 83: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/83.jpg)
Using SonarQube on existing projects
![Page 84: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/84.jpg)
Using SonarQube on existing projects
![Page 85: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/85.jpg)
Using SonarQube on existing projects
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.
o Cutoff plugin
![Page 86: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/86.jpg)
Hotspots
![Page 87: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/87.jpg)
Planning issues
![Page 88: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/88.jpg)
Issues
![Page 89: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/89.jpg)
Tips for using SonarQube in a project
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
![Page 90: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/90.jpg)
Tips for using SonarQube in a project
Options to use SonarQubeo Central server (commit AND nightly)o IDE plugin (for instance Eclipse plugin)o Local in your development environment
Check code quality before ‘To verify’ stepo First merge your code so it is up to date
Verifier should also verify the quality
![Page 91: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/91.jpg)
![Page 92: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/92.jpg)
Accept failure, but improve continuously
“Once we accept our limits, we go beyond them.”
- Albert Einstein
![Page 93: Johan Janssen (Info Support) @johanjanssen42. SonarQube basic features Analyzing data Code review Hunting bad design and architecture Testing](https://reader035.vdocument.in/reader035/viewer/2022081516/56649d365503460f94a0ecc2/html5/thumbnails/93.jpg)
Questions Ask me! SonarQube dev /user mailinglist Sonarqube.org Nemo example dashboard SonarQube books
[email protected]@johanjanssen42