The approach we recommend to code quality?
Manage it as a water leak, fix the leak before you mop the floor!
Fix issues before they exist
SonarLint shows issues in your favorite IDE as you write code, so you can fix them early.
Available as an extension for the popular IDEs Eclipse, IntelliJ and Visual Studio, SonarLint provides on-the-fly feedback to developers when they inject new bugs or quality issues. Once the problem is detected it can be fixed on the spot.
Track issues on new code
Fixing the leak consists of reviewing new code, and making sure it does not introduce new issues.
Fixing technical debt is always a daunting task for developers because they have to pay back past mistakes, without getting any direct return on their efforts. On the other hand, tracking and fixing newly introduced issues are reasonable and enjoyable tasks because they help developers to do a better job … and the more the code gets changed the more the quality improves.
Quality Gate on New Code
Making sure new code meets requirements should be the only objective of quality for development teams.
The list of criteria used to define the releasability of an application in terms of code quality should be evaluated on new - changed and added - code. This has many benefits such as avoiding pushback from teams, fixing issues while they are still fresh in mind… SonarQube comes out-of-the box with Quality Gate criteria which fails on new bugs, new security vulnerabilities, low test coverage on new code and low overall quality of new code.
Quality Gate Status Notification
Monitor Quality Gate status with real time failure notifications.
The Quality Gate is your most powerful tool to enforce your quality policy so it is important that you can track the status at any time: its status can be pushed into emails or other applications but can also be pulled out of SonarQube at any time. This transparency ensures that internal quality is part of the software development lifecycle, rather than an afterthought practice.