We develop small applications for various customers. I now got a task to set up some coding guidelines for in-house and external programmers.
(Management know nothing about development and only see the problem in transferring projects from one developer to another. Customers pay by the hour and development is a small part of total project so code quality is a non-issue)
My first step is to set up guidelines for C# and VB.Net (SQL will probably come later).
(Most code here is created with CTRL-CCTRL-V and testing is done with F5.
I have tried to introduce unit testing / code review but that is not going to happen. Static analysis is the only way forward at the moment)
I am most comfortable in C#/C++ (but sometimes work with existing VB6/VBA/VB.Net code) so setting up C# guidelines is pretty easy:
- Warning Level 4
- StyleCop
- FxCop
- Code metrics (e.g. Cyclomatic complexity < 15, Maintainability > 50)
For VB.Net I need to replace StyleCop with some written guidelines but how do I set up the VB.Net compiler.
Personally I never code without Option Explicit
/ Option Strict
etc but if I do that on our VB.Net projects I get hundreds of warnings/errors (implicit conversions, default return type/value etc).
The VB developers does not seem to have a problem working without help from compiler warnings. I do not think their productivity generally differs from C# developers (it is more a personal thing).
I do not want to enforce my own preference for static checking so my questions is:
What warning levels are reasonable/best practice for VB.Net development?
(English is not my first language so I hope this does not sound like I think VB.Net or VB Developers are inferior to C# in any way. I just don't have much experience in VB.Net projects)