Sonar Overview

  • 2,878 views
Uploaded on

 

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
2,878
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
164
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Do Great Code! Samuel Langlois, 17-Jan-2013
  • 2. Sonar• A platform to manage code quality• Free, open source, LGPL, web-based portal• Backed by• Aggregates well-known tools – Static analysis (PMD, findbugs, Checkstyle) – Duplicate code (Squid, CPD) – Code coverage (Cobertura, JaCoCo) (name change soon?)
  • 3. Sonar @ Alfresco• http://sonar.alfresco.com• Open access, LDAP authentication coming• Contains the following projects: – Enterprise HEAD (Maven build) – CLOUD1 (Maven build) – Benchmark – Android SDK and App – …
  • 4. Sonar portal
  • 5. Sonar – Basic statistics
  • 6. Drilling down• Whole project – Project/module • Java package – Java class
  • 7. Sonar – Duplications
  • 8. Sonar – Package tangle
  • 9. Sonar - Coverage
  • 10. Clouds
  • 11. Sonar - Violations
  • 12. Violation examples• Impossible cast
  • 13. Violation examples• Dead store
  • 14. Violation examples• Dead store
  • 15. Violation examples• Redundant nullcheck
  • 16. Violation examples• Empty if statement
  • 17. Managing violations• For each violation you can – Comment – Change its severity – Declare it as a false-positive – Assign it to someone – Assign it to an action plan
  • 18. Time machine
  • 19. Technical debt• Term coined by Ward Cunningham in 1992• Work that needs done before a job is complete • Unwritten tests • Bad design and architecture • Duplicated code • …• The higher you wait to fix, the more expensive it becomes
  • 20. SQALE• Based on ISO 9126 Quality Model• Computes a Technical Debt, measured in days
  • 21. Code quality“A well-written program is a program wherethe cost of implementing a feature isconstant throughout the programs lifetime.”
  • 22. What now?• What to start with? – Improving test coverage? – Removing duplicate code? – Checking violations? – …• Where to start? – Most critical projects? – Most « buggy » projects? – Voluntary teams? – … Try it and tell me!