Is there a way to calculate these without having to interact or use Visual Studio, so that it can be automated or used somehow as part of a build CI?
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@mavasani Manish, do you know if code metrics can be obtained at the command line?
Yes, we added support for both the following:
Both the above work for all .Net projects (netframework, netcore, netstandard).
See the UPDATE sections in https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/33459643--netcore-code-metrics for details. @gewarren, we should probably update the docs accordingly.
Okay I see the project in Github now that does this, however it's internal and not published as a NuGet package :( I was hoping to somehow hook in to this using a custom .NET Core Built project that scans a selection of .NET projects with a dashboard. Will this become a NuGet package at some point or will I have to build and use the exe?
@pjmagee For now, you will have to build and use the exe. Please upvote or comment on https://github.com/dotnet/roslyn-analyzers/issues/1756 so we can prioritize that work item. Tagging @jinujoseph as well.
I added a section about calculating code metrics at the command line - https://docs.microsoft.com/en-us/visualstudio/code-quality/how-to-generate-code-metrics-data?view=vs-2017#command-line-code-metrics. Closing this issue.
Most helpful comment
@pjmagee For now, you will have to build and use the exe. Please upvote or comment on https://github.com/dotnet/roslyn-analyzers/issues/1756 so we can prioritize that work item. Tagging @jinujoseph as well.