Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
796 views
in Technique[技术] by (71.8m points)

coding style - What StyleCop like tools are there for VB.NET

see also VB.NET Static Code Anaylsis

For better or for worst we now have a VB.NET coding standards document that is based on a C# coding standard as enforced by StyleCop.

For example

  • the number of spaces you should put in each side of a “+” sign etc
  • all instance Members (fields and methods!) must be access as “me.fieldName”
  • all shared members must be accessed as “className.fieldName”

As I tend to think:

If it’s in a requirements document it should be check for by an automatic system

I am looking for (ideally free) tools that will check for that short of rules on VB.NET code, as these are style issues that don’t make it into the compiled output, FxCop is not useful.

(I would personally match rather that we just check for important things like duplicated code and single reasonability for each class (so no more multi thousand line classes!), but as I need to keep to the coding standard document I wish to have a tool to help me do so.)

see also Enforcing using the class name whenever a shared member is accessed.

About the bounty.
I am looking for a list of VB.NET code checking tools, with a short summery of what each tool can do and its limitations. If the tools are not free, please include some ideal of cost.


Does anyone have experience using CodeRush/Refactor! or ReSharper with VB.NET to check for this type of coding style issues?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I know of no free source code analysis tools with good VB support. There are, however, at least two commercial tools that may be suitable:

  1. submain CodeIt.Right
  2. SSW Code Auditor

Personally, I prefer the CodeIt.Right rule authoring mechanism, so I would favour it if considerable custom rule development were planned. However, if you just want to use out-of-the box rules, Code Auditor ships with quite a few more code style rules than CodeIt.Right, most of whose built-in rules target the compiled IL (like FxCop).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...