Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make an exception to certain StyleCop rules? [duplicate]

Possible Duplicate:
How to suppress a StyleCop warning?

Currently I'm setting up StyleCop for our projects and I stumbled on one rule of StyleCop. It's about the SA1300 naming rule:

SA1300: namespace names begin with an upper-case letter: iCompanyName.

So my company starts with a lower-case letter. And various product names do also. Therefore, is there a possibility to add exceptions to this rule in the Settings.StyleCop file?

I'd like to prevent to write custom StyleCop rules using C#.

Thanks in advance for your replies.

edit: I realize I should have noted that I don't actually want to disable/suppress the StyleCop rule completely. I'd just like to make some exceptions on this naming rule.

like image 878
Herman Cordes Avatar asked Jul 05 '11 13:07

Herman Cordes


1 Answers

The SA1300 rule is not configurable (at least in version 4.4). If you don't like its behaviour and don't want to disable the rule entirely, you will need to use a substitute custom rule. You might be able to find one available from a third-party such as the StyleCop+ project. If not, you're pretty much stuck rolling your own...

like image 87
Nicole Calinoiu Avatar answered Oct 04 '22 05:10

Nicole Calinoiu