I have a problem with the code analysis rule CA1726:UsePreferredTerms. Our business domain has two crucial concepts named Case
and Flag
. According to CA, it's apparently a deadly sin to use these names, however I really don't care since, as I said, they are crucial concepts in our domain model. CA complains not only about the type declarations but about every method parameter-name aswell. So does anyone know if there is a workaround other than adding loads of suppressions or disabling the rule altogether? Could I add the names to a custom dictionary?
Asked
Active
Viewed 733 times
1

Klaus Byskov Pedersen
- 117,245
- 29
- 183
- 222
1 Answers
3
I would suggest adding the names to a custom dictionary as your first ditch effort, yes. It's a dead-simple thing to do, and I've had to add a custom dictionary for every single non-trivial project that I've worked on for various problem-domain terms.

Greg D
- 43,259
- 14
- 84
- 117
-
but CA1726 doesn't use preferred alternatives in CustomDictionary.xml. So Login will still raise warnings for instance. – Robert Koritnik Jan 23 '14 at 11:20