Code Quality Tools
TeamCity comes bundled with a number of tools capable of analyzing the quality of your code and reporting the obtained data. If you are using the tools which are currently not supported, TeamCity can be configured to run them and display their report results.
Bundled Tools
Generally, the tools are configured as build runners and the results are displayed on the Build Results page as well as in the IDE for some of the tools. You can also configure builds to fail based on the results and view the trends as statistics charts.
Java Tools
IntelliJ IDEA-powered Code Analysis Tools
These are available when you have an IntelliJ IDEA project (.idea directory or .ipr file) or a Maven project file (pom.xml) checked into your version control.
Inspections (IntelliJ IDEA) runs IntelliJ IDEA inspections in TeamCity. These include more than 600 Java, HTML, CSS, JavaScript inspections.
Duplicates Finder (Java) provides a report on the discovered repetitive blocks of code.
Code Coverage tools
These are configured in the dedicated sections of the build runners.
IntelliJ IDEA code coverage is supported for Ant, IntelliJ IDEA Project, Gradle or Maven build runners.
JaCoCo coverage supports Ant, IntelliJ IDEA Project, Gradle and Maven build runners.
.Net Tools
ReSharper-powered Tools
These are available if you use Visual Studio.
Inspections (.NET) gathers results of JetBrains ReSharper Code Inspections in your C#, VB.NET, XAML, XML, ASP.NET, JavaScript, CSS and HTML code.
Duplicates Finder (.NET) provides a report on the discovered repetitive blocks of C# and VB.NET code.
FxCop uses Microsoft FxCop pre-installed on a build agent.
Code Coverage
The following code coverage tools are supported for .NET Process Runner, MSBuild, MSTest, NAnt and NUnit build runners:
For the .NET CLI (dotnet) runner and with NUnit version 3.x the only supported coverage tool is JetBrains dotCover.
Reporting External Tools Results in TeamCity
If you need to use non-bundled tools, you can use TeamCity to import their results and display them in the TeamCity UI.
Supported Report Formats
The external tool reports are supported via the XML Report Processing build feature. See the list of supported reports.
Including HTML Reports
If your reporting tool is not supported by TeamCity directly, you can make it produce reports in the HTML format via a build script and add a build results report tab in TeamCity.
Importing Code Coverage Results
You can also import code coverage results in TeamCity.
Integration with External Tools
TeamCity can also be integrated with external build tools or tools generating some report/providing code metrics which are not yet supported by TeamCity. The integration tasks involved are collecting the data in the scope of a build and then reporting the data to TeamCity.