O'Reilly logo

Sonar Code Quality Testing Essentials by Charalampos Arapidis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a coding standards profile

To create a coding standards profile, it is necessary to know the responsibilities and specialization of each code analyzer, along with the rules it incorporates.

Sonar's source code analyzers have different responsibilities. There are some overlapping rules, but in general each analyzer has a separate focus. At the time of writing, Checkstyle has 122 rules, mainly checking Java standards and conventions.

Findbugs features 384 rules grouped by category. It specializes in locating vulnerable code that could lead to potential bugs or defects.

Findbugs Rules Breakdown

Category

Count

Bad Practice

77

Correctness

139

Multithreaded Correctness

41

Dodgy

58

Experimental

10

Malicious code vulnerability

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required