Code Quality Tracking

Duplicate code analysis for Java and .NET

Duplicate code fragments is what makes our code hard to maintain.

Fortunately TeamCity comes bundled with tools like IntelliJ IDEA and ReSharper which provide sophisticated analysis for Java and .NET languages respectively.

Code coverage

For Java, TeamCity comes with coverage engines based on IntelliJ IDEA and JaCoCo library. For .NET, TeamCity integrates with dotCover, NCover and PartCover.

Results of other coverage tools can also be imported.

Static code analysis

TeamCity uses a set of several hundred IntelliJ IDEA and ReSharper inspections to analyze your code and identify potential problems.

If you prefer to use other tools, TeamCity supports FxCop out of the box. It can also import reports produced by PMD, PMD/CPD, FindBugs, Checkstyle or JSLint.

Code quality reports right in your IDE

We strongly believe code quality improvement is a team's everyday job.

To help you do this job well, there are a TeamCity plugins for popular IDEs. For example, TeamCity IntelliJ IDEA plugin can automatlcally download fresh inspection results, duplicated code results and code coverage from the TeamCity server. These results are then shown right in the editor where we modify our code. TeamCity plugins for Visual Studio and Eclipse can show code coverage from server as well.

Not sure whether it is safe to modify these lines of code in a class? Take a look at the coverage.

Seeing duplicated or dead code in the editor? Eliminate it right away!

Build failure conditions

Each code quality report provides metrics which can be used in build failure conditions.

To avoid degradation of some metrics over time, build failure condition can be configured to fail a build if its quality metrics decreased compared to a previously finished build, or compared to some build selected as the benchmark.