Introduction
Clean as You Code is a software development practice based on the principle that new code (code that you added or modified recently) needs to comply with quality standards. The Sonar solution implements Clean as You Code by warning you whenever issues are detected in your new code.
When you add new code to your projects, you usually touch a portion of the old code in the process. As a consequence, analyzing and cleaning new code allows you to fix issues in your old code and gradually improve the overall quality of your codebase.
The end goal is to achieve a state of Clean Code for your entire codebase. This approach is also suitable for legacy projects with a substantial amount of code, although in this case a full cleanup can hardly be achieved.
Sometimes, you may want to implement additional measures to ensure the quality of the overall code base, such as checking for vulnerabilities and performing refactoring. Clean as You Code does not prevent you from pursuing these additional use cases.
For developers
- You ensure that all new code added to the project is always clean.
- You gain time by reducing and even eliminating debt-addressing sprints.
- You adopt a sustainable approach to software development, as cleaning code becomes part of the development routine.
- You fix issues in your own code, reducing the complexity that comes with fixing old code that is hard to understand.
For organizations
- The overall quality of your code increases over time.
- You ensure your software meets high quality standards.
- You increase developer morale by reducing debt-addressing sprints.
- Engineering/Feature development velocity increases.
Related pages
Was this page helpful?