Can StyleCop automatically fix anything?

后端 未结 9 2291
盖世英雄少女心
盖世英雄少女心 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:50

    1. Turn off the warnings! Not recommended, but you could use this in the short term until you get a bulk of the issues resolved.
    2. Write a program to fix some of the simpler warnings, or use find/replace
    3. Use code snippets to help with things like file header documentation

    There was mention on the StyleCop blog regarding implementing auto fixing for rules

    Also check out the entry on the blog regarding integrating in to an existing large project.

    Note: It seems that StyleCop only returns around 1000 warnings, so you will continue to get this number even after fixing a heap.

提交回复
热议问题