当前位置: 动力学知识库 > 问答 > 编程问答 >

Can you create a whitelist of stylecop rules instead of a blacklist?

问题描述:

I'm working on a project which is using StyleCop to police its coding policies. From working on other projects, I have StyleCop+ rules installed. Because StyleCop runs all the rules it can find, the additional rules are running on my local builds, causing extra warnings for me to filter to reach the ones I genuinely need to fix.

Is there a way to make the settings file for the project a whitelist such that StyleCop will only run the rules specified?

网友答案:

Yes. See the "Enabled Or Disabled By Default" section at https://stylecop.codeplex.com/wikipage?title=Using%20File%20Lists for details on using the RulesEnabledByDefault setting.

分享给朋友:
您可能感兴趣的文章:
随机阅读: