Chapter 4. Following Coding Standards

In this chapter, we will discuss coding standards and the way Sonar monitors such violations. We will use Sonar to track down coding standards violations and correct them. To better understand the process, a small project containing classes lacking in standards department will be inspected by Sonar. Then, we will go over identifying and eliminating the violations one by one, examining the cause of each violation and providing a possible solution on how to eliminate it or overcome it. To fine grain Sonar output, we will define a custom profile focused on coding standards violations.

Before diving into the whole process, a general discussion about coding standards is necessary, exploring the purpose they serve, ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.