FxCop Suppression

I have a control on an Asp.Net page, on this page there is a control called "PaReq" that breaks the rule:

CA1704: IdentifiersShouldBeSpelledCorrectly

I used suppression before I am not sure how to suppress this error, as it is defined in the generated file.

I could do this in a user dictionary, but that would mean that all developers would need to synchronize a copy of this dictionary, which I would rather avoid if possible. In addition, the term "PaReq" is used only in this project.

How and where to apply suppression?

+4
source share
2 answers

I save a custom dictionary for each project that contains specific words for this project. This dictionary file is in my SourceControl repository, so other developers can use it (and add new words).

+6
source

AFAIK, you can add suppression at the Assembly level, although I did not use it in anger! If you do this, you will have false negatives. (i.e. suppress all incidents that violate this rule).

[SuppressMessage ("Microsoft.Design", "CA1704", Scope = "Assembly")]

I think the user dictionary in the source control is the best option, otherwise you can save the FxCop project in the source control.

+2
source

All Articles