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

174 views Asked by At

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?

1

There are 1 answers

2
Nicole Calinoiu On

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.