TSQLLint VS Code Extension
TSQLLint is a tool for describing, identifying, and reporting on undesirable patterns in TSQL scripts. This extension provides this functionality within VS Code.
This extension may be installed from within VS Code or the VS Code Marketplace of from the Extensions dialog in VS Code.
After installation, this extension will activate when any .sql file is opened within VS Code. Potetial problems will be underlined in red and details will be available by hovering over the underline.
Creating custom configurations
Configure tsqllint by creating a config file called ".tsqllintrc" in your $HOME directory in OSX or %HOMEPATH% directory in Windows.
Rules may be set to "off", "warning", or "error".
Disabling Rules with Inline Comments
To temporarily disable rule warnings in a script, use comments in the following format:
You can also disable or enable warnings for specific rules:
To disable warnings for the entire script, place a /* tsqllint-disable */ comment at the top of the file:
To disable specific rule warnings for the entire script place a comment similar to the following at the top of the file:
You can extend the base functionality of TSQLLint by creating a custom plugin. TSQLLint plugins are .Net assemblies that implement the IPlugin interface from TSQLLint.Common.
Details on plugin development may be found in the TSQLLint documentation