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

Get Sonar Code Quality Testing Essentials now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.