0

I have an MVC project that is prone to spelling mistakes with short acronyms. i.e. people writing "ZED" instead of "DEZ".

Is it possible to get Visual Studio to throw an error during a build if a specific word is found anywhere within the code being built? My biggest concern is checking to see if it appears in any of the views more than anything else. i.e. If any view contains "ZED" the compiler would throw an error and prevent anything from being published.

Any ideas?

Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
Dezzamondo
  • 2,169
  • 2
  • 20
  • 33

1 Answers1

1

You can use code analysis automation tools like fxcop or stylecop. Build your custom dictionary of allowed words and enable the code analysis policy during builds.

Community
  • 1
  • 1
vendettamit
  • 14,315
  • 2
  • 32
  • 54