Welcome to MSDN Blogs Sign in | Join | Help

TIP: How to change the FxCop naming/design rules to fire on internals [David Kean]

By default, the FxCop naming and design rules only fire on publicly visible types and members. There are a couple reasons for this:

  • The .NET Framework Design Guidelines, which FxCop enforces, only contains guidelines for publicly visible API. What internal Microsoft teams (and you) do with their internal types and members is completely up to them.
  • Noise. If you tend to wrap a lot of native types and members, then this internal API could be potentially fire numerous violations.

However, if you would feel like you would like to be consistent with both your internal and customer facing API, then a little known feature is the ability to override this default in FxCop.

To do this, simply do the following:

  1. Using FxCop, open your FxCop project
  2. Choose Project -> Options
  3. Choose the Spelling & Analysis tab and check Run all overridable rules against all targets
  4. Click OK

Unfortunately, it is not possible to currently change this in Visual Studio Code Analysis.

Published Tuesday, August 08, 2006 8:56 PM by David M. Kean

Comments

Saturday, August 19, 2006 12:05 PM by Muhammad Haroon

# re: TIP: How to change the FxCop naming/design rules to fire on internals [David Kean]

This is great.  I was hoping that there was a way to fire the rules on internals in order to enforce coding srandards.  I'll check it out at once!
Sunday, August 27, 2006 6:52 AM by Adi

# re: TIP: How to change the FxCop naming/design rules to fire on internals [David Kean]

How do you enable this for VS Team system?
Sunday, August 27, 2006 1:04 PM by David M. Kean

# re: TIP: How to change the FxCop naming/design rules to fire on internals [David Kean]

No it is not possible to enable this for Visual Studio.
Tuesday, May 15, 2007 10:47 AM by The Visual Studio Code Analysis Team Blog

# TIP: How to change the (Orcas) Managed Code Analysis naming/design rules to fire on internals

A while ago I mentioned that FxCop (and hence Managed Code Analysis) naming and design rules only fire

New Comments to this post are disabled
 
Page view tracker