Skip to content
Roslyn analyzers for VB UWP apps
Visual Basic PowerShell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/VBStyleAnalyzer
.gitignore
LICENSE
README.md

README.md

VBStyleAnalyzer

License: MIT

A set of Roslyn code analyzers, specifically aimed at enforcing Visual Basic Coding Conventions in UWP apps.
Created for use to confirm consistency in the projects generated by Windows Template Studio. (WTS also uses other syntax tests to verify code structure, layout, and formatting that are not available as Analyzers.)
It is intended to be used in companion with SonarAnalyzer.VisualBasic.

Rules

The following rules have been / will be created.

Naming

  • VBSAN001 Do not use "my" at the start of a name.

Layout

  • VBSAL001 Use only one statement per line. Don't use the Visual Basic line separator character (:).
  • VBSAL002 Add exactly one blank line between method and property definitions.

Commenting

  • VBSAC001 Put comments on a separate line instead of at the end of a line of code.
  • VBSAC002 Start comment text with an uppercase letter, and end comment text with a period.
  • VBSAC003 Insert one space between the comment delimiter (') and the comment text.
  • VBSAC004 Do not surround comments with formatted blocks of asterisks.

Misc

  • VBSAM001 Use meaningful names for LINQ query variables.
  • VBSAM002 Do not include braces in property declaration.
  • (?) Use the IsNot keyword instead of Not...Is Nothing.
  • (?) New Keyword: Use short instantiation.
  • (?) Use Handles rather than AddHandler.

(?) = Possible additions

You can’t perform that action at this time.