Skip to content

fujimotok/VisualStudioMetricsOnCodeLens

Repository files navigation

VisualStudioMetricsOnCodeLens

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.

Require

  • Visual Studio 2022

Options

"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

Mechanism

  1. Hook to save and run analysis
  2. Save results in "{slnDir}/.Metrics/{project}.json"
  3. Forces a CodeLens update
  4. CodeLens will see the results

Acknowledgements

This software was inspired by the following repositories.

Project contents

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

About

Display Visual Studio's code metrics results on CodeLens.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages