Calculate code metrics as part of build pipeline in Devops

Viewed 430

This seems a pretty straightforward thing to do, but I cannot find relevant information. In Visual Studio is very easy to calculate code metrics for all projects and I would like to do the same during a build pipeline in Azure DevOps.

Has anyone done something like this?

1 Answers

In azure devops, you can review code coverage results. The results can be viewed and downloaded on the Code coverage tab.

  • Publish Code Coverage Results publishes code coverage results to Azure Pipelines or TFS, which were produced by a build in Cobertura or JaCoCo format.
  • Built-in tasks such as Visual Studio Test, .NET Core, Ant, Maven, Gulp, Grunt, and Gradle provide the option to publish code coverage data to the pipeline.

Here are some documents you can refer to:

In addition, you can get code analysis through SonarCloud integrated with Azure devops. SonarCloud is a cloud-based code quality and security service. Here is the lab you can follow.

Related