12
Prashant Gupta

Sonar Tool - JAVA code analysis

Embed Size (px)

Citation preview

Page 1: Sonar Tool - JAVA code analysis

Prashant Gupta

Page 2: Sonar Tool - JAVA code analysis

Introduction to Sonar

This Presentation is About

oCode Analysis, not Run-Time monitoring

oThis Presentation is NOT about Performance Analysis Tools

•Profiling

•Jconsole or other Dynamic Memory Monitoring

•Debugging Tools

Page 3: Sonar Tool - JAVA code analysis

Code Review Tools

Advantages of Code Review Tools

Aid in comparing before and after changes

Source Code repository integration.

FindBugs,PMD,CheckStyle,Jdepend,Javancss..etc

Page 4: Sonar Tool - JAVA code analysis

SONAR

o A platform to manage code quality

o Free, open source, web-based portal

o Backed by

o Aggregates well-known tools

•Static analysis (PMD, findbugs, Checkstyle)

•Duplicate code (Squid, CPD)

•Code coverage (Cobertura, JaCoCo)

Why?

Code quality analysis helps you to make your code:

less error-prone

more reliable

more readable

more welcoming to new contributors

Page 5: Sonar Tool - JAVA code analysis

SONAR Portal

Page 6: Sonar Tool - JAVA code analysis

SONAR– Basic statistics

Page 7: Sonar Tool - JAVA code analysis

SONAR Example –

Front Dashboard

Page 8: Sonar Tool - JAVA code analysis

SONAR Application

Dashboard

Page 9: Sonar Tool - JAVA code analysis

SONAR Violations

Drilldown

Page 10: Sonar Tool - JAVA code analysis

SONAR Hotspots

Page 11: Sonar Tool - JAVA code analysis

SONAR Drilldown

continue ...

Page 12: Sonar Tool - JAVA code analysis