⚪ ️2.5 Measure and refactor using static analysis tools

:white_check_mark: Do: Using static analysis tools helps by giving objective ways to improve code quality and keep your code maintainable. You can add static analysis tools to your CI build to abort when it finds code smells. Its main selling points over plain linting are the ability to inspect quality in the context of multiple files (e.g. detect duplications), perform advanced analysis (e.g. code complexity) and follow the history and progress of code issues. Two examples of tools you can use are SonarQube (4,900+ stars) and Code Climate (2,000+ stars)

Credit: Keith Holliday


Otherwise: With poor code quality, bugs and performance will always be an issue that no shiny new library or state of the art features can fix


Code Examples

:clap: Doing It Right Example: CodeClimate, a commercial tool that can identify complex methods:

alt text