Can StyleCop automatically fix anything?

后端 未结 9 2286
盖世英雄少女心
盖世英雄少女心 2020-12-30 22:20

I\'ve decided to start running StyleCop on a medium sized project and am getting over 1000 warnings.

Is there a quick easy way to fix most of these warnings? Most of

9条回答
  •  情话喂你
    2020-12-30 22:47

    Nowadays you can use the StyleCop.Analyzers NuGet package in your projects.

    Updating the package can result in a lot of new warnings.

    Ctrl + . shows available quick fixes. A fix can be applied to the whole document, project or solution at once.

    A Preview Changes window lets you deselect the lines to resolve manually.

    CodeMaid is a good tool to fix formatting errors in batch or automatically.

提交回复
热议问题