WL SQL Linter

SQL linter with quick fixes for brackets [], WITH (NOLOCK), and best practices. No auto-formatting!

Features
This extension only shows warnings - it never auto-formats your code. You decide when to fix.
Quick Fix with Cmd+. / Ctrl+.
Press Cmd+. (Mac) or Ctrl+. (Windows) on any warning to see quick fix options.
1. Bracket Check [identifier]
Warns when table/column names are not wrapped in brackets.
-- Warning: Table "Users" should be wrapped in brackets
SELECT * FROM Users
-- Quick fix applies:
SELECT * FROM [Users]
2. WITH (NOLOCK) Check
Warns when SELECT statements are missing WITH (NOLOCK) hint.
-- Warning: Table "Users" is missing WITH (NOLOCK) hint
SELECT * FROM [Users]
-- Quick fix applies:
SELECT * FROM [Users] WITH (NOLOCK)
3. SELECT * Warning
Warns against using SELECT * (informational, no auto-fix).
-- Info: Avoid using SELECT * - specify column names explicitly
SELECT * FROM [Users]
Fix All Issues
Cmd+. → "Fix all X SQL lint issues"
- Or use Command Palette:
WL SQL: Fix All Issues
Configuration
{
"wlsql.enableBracketCheck": true, // Check for missing []
"wlsql.enableNolockCheck": true, // Check for missing WITH (NOLOCK)
"wlsql.enableSelectStarCheck": true, // Warn against SELECT *
"wlsql.severity": "warning" // error | warning | information | hint
}
Commands
| Command |
Description |
WL SQL: Fix All Issues |
Fix all fixable issues in current file |
WL SQL: Toggle Linting |
Enable/disable linting |
Installation
From VS Code
- Open VS Code
- Press
Cmd+P / Ctrl+P
- Type
ext install RithyTep.wlsql
- Press Enter
From VSIX
code --install-extension wlsql-1.0.0.vsix
This extension is designed for linting only - it shows you problems but lets you decide how to fix them. This is intentional because:
- SQL formatting is highly subjective
- You may not want NOLOCK on every table
- Some identifiers don't need brackets
- You stay in control
License
MIT © RithyTep