StyleCop 可以自动修复任何东西吗? [英] Can StyleCop automatically fix anything?
问题描述
我决定开始在一个中型项目中运行 StyleCop,但收到了 1000 多个警告.
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 the warnings could easily have been automated to resolve and would save me a lot of time.
推荐答案
这并不能完全自动修复任何东西";但有一个 StyleCop 插件,适用于 Github 将自动突出显示代码中的样式错误.
This doesn't exactly "automatically fix anything" but there is a StyleCop plug-in for Resharper on Github that will automatically highlight the style errors in your code.
更新:根据 StyleCop for ReSharper 网站a>,ReSharper 现在提供了越来越多的快速修复 用于 StyleCop 错误.您从列表中选择一个快速修复,问题将自动解决.
Update: According to the StyleCop for ReSharper website, ReSharper now provides an increasing number of Quick-Fixes for StyleCop errors. You select a quick-fix from the list and the problem will be resolved automatically.
这篇关于StyleCop 可以自动修复任何东西吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!