Skip to content

Latest commit

 

History

34 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Roslyn analyzers for VB UWP apps

Resources

Stars

1 star

Watchers

1 watching

Forks

Used by

Contributors

Languages