sonar in action 20110302-vn

19
1 Sonar in Action by Frédéric DROUET and Arnaud HERITIER 02/03/2011

Upload: arnaud-heritier

Post on 25-May-2015

440 views

Category:

Documents


3 download

DESCRIPTION

Presentation done in VN office (2011/03/02) Why do we need to use Sonar at

TRANSCRIPT

1

Sonar in Action

by Frédéric DROUET and Arnaud HERITIER

02/03/2011

2

Agenda

» How do we measure the code quality ?

» The 7 worst practices

» The Goals of Sonar

» Demonstration on YOUR code

3 3

Why do we need this kind of tool

4

How do we measure the code quality ?

In the past

5

How do we measure the code quality ?

That is not sufficient !

6

How do we measure the code quality ?

Today : we need to measure the Technical Debt …

7

How do we measure the code quality ?

… and to monitor this Technical Debt …

… to take corrective actions without being blind

8

The 7 worst practices

9

The 7 worst practices

1- Duplicated code

»  Which one do you prefer ?

10

The 7 worst practices

2- Maldistribution of the complexity

»  What is the best ?

»  1 method with a complexity of 30

»  10 methods with a complexity of 3

11

The 7 worst practices

3- Bad design

»  Which package / class

is responsible of what ?

12

The 7 worst practices

4- Potential bugs

13

The 7 worst practices

5- Little or no use of unit tests

»  Please add a new case BUT without any regression of course

14

The 7 worst practices

6- Non-compliance with standards

»  We have opened a dedicated Wiki Space for Development Standards for eXo

»  https://wiki-int.exoplatform.org/display/DEVSTD

15

The 7 worst practices

7- No comment or too many comments

16

The goals of Sonar

17

The goals of Sonar

» Help the developer to find the problems

» Help the managers to monitor the health of the codebase and to follow the trends

18

Demonstration

19

Demonstration » https://sonar.exoplatform.org