Simple and short article. From the series "note hostess."
There is a flexible code scanning system for compliance with the rules, metrics (useful, such as cyclomatic complexity), and so on.
Called
Sonar .

')
A couple of screenshots of live data under the cut.
Overview of Features
- Supports major languages ​​(Java, C #, C / C ++, Cobol, PL / SQL, ABAP, Javascript, PHP etc)
- It has a flexible custom code scan rule system.
- Understands OOP (cyclomatic complexity, number of levels of inheritance, connectedness, and so on)
- Adjusted for half a day
- Integrates with TeamCity
- Allows you to see changes after refactoring (stores the change log)
It is applied simply
1. Sonar set to project
2. Give a list of the most difficult classes to refactor (yes, refactoring is obligatory and you need to give time to it, otherwise one day you, as a project manager, hear the magic words “it's easier to throw out and rewrite everything” - if you have bold and cool programmers, or they will just be doing everything brake and with a bunch of bugs in unexpected places, if the progers are weak or timid).
It does not replace codereview, but complements.3. Programmers refactor
4. Set on again and see the delta.
General view for projects

Shoal list

Slice between two scans

On Habré there were articles, but for a long time, and for Java generally.
In the comments, I propose to share the QA automation tools that you use at home.