.netvisual-studio-code.net-coredotnet-cli

Is there any "Analyze and Code Cleanup" tool for .NET project in VS Code or .NET CLI?


In Visual Studio 2022, there is a Analyze and Code Cleanup feature which is really good.

Analyze and Code Cleanup

I'd like to know that is there any equivalent tool I can use in VS Code or in .NET CLI or in MSBuild?


Solution

  • There are plenty of those, I have used dotnet-format and heard about ReSharper Command Line Tools those are being distributed as a dotnet-tool.

    There is even a ready to use github action for dotnet-format and it is being configured through editorconfig so there is no problem at all to integrate it in a CI\CD pipelines.