Display Visual Studio's code metrics results on CodeLens.
Save the code and run the analysis.
The analysis status is output to "VisualStudioMetricsOnCodeLens" in "Output".
Once the analysis is complete, it will be reflected in CodeLens.
- Visual Studio 2022
"options">"Metrics on CodeLens"
- CodeLens description format
Customize description with placeholders
%MI%: Maintainability Index
%CY%: Cyclomatic Complexity
%CC%: Class Coupling
%DI%: Depth Of Inheritance
%SL%: Source Lines
%EL%: Executable Lines
- Hook to save and run analysis
- Save results in "{slnDir}/.Metrics/{project}.json"
- Forces a CodeLens update
- CodeLens will see the results
This software was inspired by the following repositories.
Extension require
- source.extension.vsixmanifest
- VisualStudioMetricsOnCodeLensPackage.cs
CodeLens
- Metrics.cs
- MetricsCodeLensDataPoint.cs
- MetricsCodeLensDocumentParser.cs
- MetricsCodeLensProvider.cs
Misc
- SaveCommandHandler.cs
- OptionPage.cs
Utils
- WorkspaceExension.cs
- PipeServerHost.cs
- Logger.cs