We're looking for a syntax checker for C#, something like Checkstyle for Java. Does anyone have any recommendations for any tools that we can use? Ideally it would have a plugin to Visual Studio 2008.
+2
A:
You mean, something like StyleCop? There is a plugin for ReSharper as far as I know. You can find it at StyleCopForResharper. Works like a champ btw.
Otávio Décio
2009-07-23 19:22:31
A:
The main option for .Net is StyleCop. It can be used from within Visual Studio. See also the StyleCop Blog.
Ben Lings
2009-07-23 19:29:22
A:
I would recommend just pressing ctrl-k-d after edits. This will format the C#-code according to visual studio settings. Instead of detecting bad formatting, you could just correct it. I personally always leave it at the defautl settings in order to increase interoperability between devs. I also think that the particular style does not matter for productitvy - but consistency does.
usr
2009-08-27 14:18:57
Ctrl+K+D does not do the same things as a program like FxCop or StyleCop. All Ctrl+K+D does is indent and line break the code, it doesn't even check for consistent naming conventions or anything else.
Brandon
2009-08-27 14:25:57