Question

I have a control on an Asp.Net page, on that page is a control with the name "PaReq" that violates the rule:

CA1704:IdentifiersShouldBeSpelledCorrectly

I've used suppression before I'm not sure how to suppress this error since it is defined in the generated file.

I could do this in a custom dictionary but that would mean all the developers would need to keep sync a copy of this dictionary which is something I'd rather avoid if possible. Also that the term "PaReq" is only used in this project.

How and where would I apply the suppression?

Was it helpful?

Solution

I keep a custom dictionary per project which contains specific words for that project. That dictionary file is in my SourceControl repository, so other developers can use it (and add new words) as well.

OTHER TIPS

AFAIK you can add a suppression at the Assembly level although I've not used it in anger! You'd end up with some false negatives if you do that. (i.e. suppress all of the incidents that break this rule).

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

I think the custom dictionary in source control is the best option, alternatively you could keep the FxCop project in source control.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top