Skip to content

A simple example of using ScriptDom namespace to evaluate SQL statements for code quality tooling.

Notifications You must be signed in to change notification settings

jwendl/SqlServerCodeAnalysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

T-SQL Code Analysis using the Microsoft.SqlServer.TransactSql.ScriptDom namespace

Requires at least Visual Studio 2015

To run, just clone the repository and open visual studio

Unit tests are built around the visitors

Documentation

Rules are the integration point with Visual Studio and MSBuild Visitors are the classes that are called during an explicit visit of a specific node

The query SELECT * FROM TABLE WHERE COLUMN LIKE '%TEST'; gets broken up into Nodes that are explicitly visited and translated into something similar to the following:

  • SelectStarStatement
    • QuerySpecification
      • WhereClause
        • LikePredicate
          • FirstExpression
          • SecondExpression
            • StringLiteral

About

A simple example of using ScriptDom namespace to evaluate SQL statements for code quality tooling.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages