← back #01

RVM.CodeLens

Static analysis tool for .NET solutions using Roslyn, with CLI, Blazor dashboard and REST API.

Overview

RVM.CodeLens is a static analysis tool that uses the Roslyn compiler to calculate code metrics, detect architectural patterns, map dependencies and identify hotspots through Git history analysis. The project offers three interfaces: a CLI with multiple output formats (table, JSON, Markdown), a Blazor Server web dashboard with interactive visualizations and a REST API for integration with other tools.

Features

  • Cyclomatic Complexity (CC) calculation with support for if, for, switch, catch, logical and ternary operators
  • Maintainability Index (MI) using the Visual Studio formula
  • Class coupling via Roslyn semantic analysis
  • Inheritance depth and line counts (code, comments, blank)
  • Dependency graph between projects and NuGet packages
  • Automatic detection of architectural layers (Domain, Application, Infrastructure, Presentation)
  • Hotspot analysis combining Git churn with complexity
  • CLI with Spectre.Console, Blazor Dashboard and 6 REST endpoints
  • Multiple output formats: table, JSON and Markdown

Technologies

  • .NET 10
  • Roslyn (Microsoft.CodeAnalysis) 5.3
  • MSBuild Workspaces
  • LibGit2Sharp
  • Spectre.Console
  • Blazor Server
  • ASP.NET Core
  • Serilog
  • xUnit
  • Moq

Patterns & architecture

  • Layered Architecture
  • Visitor Pattern (SyntaxWalkers)
  • Strategy Pattern (Formatters)
  • Dependency Injection
  • Immutable Models (Records)
  • Minimal API (MapGroup)

REST endpoints

Method Path Description
POST /api/analyze Analyze .NET solution
GET /api/analysis/current Current analysis in memory
GET /api/metrics Metrics for all projects
GET /api/deps Dependency graph
GET /api/hotspots Git-based hotspots
GET /api/architecture Layers and violations
Available for remote work

Let's
talk?

Open to remote .NET opportunities. Reply within 24h.