Visual Studio
An extension for cleaning, organizing and navigating code in Visual Studio 2026. It uses the Roslyn that Visual Studio ships, so cleanup sees the code the way the compiler does.
- whitespace normalization, Visual Studio formatting, using organization and sorting; moving using directives into or out of the namespace with names resolved by the Roslyn semantic model
- explicit access modifiers, namespace fixing, conversion to file-scoped namespaces (C# 10+) and region removal
- .editorconfig-driven diagnostic cleanup: only rules the repository configures (suggestion, warning, error) are fixed, using the code fixes already in Visual Studio and the project’s analyzers; compiler diagnostics are never touched
- post-cleanup verification: a fix that would add a compiler error is rejected, and unresolved diagnostics are reported
- cleanup on demand, on save or for a selected scope with a one-time options dialog; C# changes previewed as a native diff with per-file and per-rule selection
- safe Razor/Blazor formatting, including @if/@else, loops, @switch and @try/@catch/@finally
- optional AI-assisted XML documentation with explicit scope, filters, budgets and secure settings
- settings precedence .editorconfig → .codejanitor → user settings; more than 190 options in 21 categories under Tools › Options; export and import of the .codejanitor policy
- navigation: active file in Solution Explorer, related files, recursive tree collapse, McCabe complexity
Requires Visual Studio 2026 (18.0 or newer; Community, Professional, Enterprise; 64-bit) and .NET Framework 4.7.2. Visual Studio 2022 is not supported and the installer rejects it: the extension uses Roslyn 5.0, first shipped with Visual Studio 2026. Install from the .vsix on GitHub Releases.