SQL Schema Guard
A lightweight Visual Studio Code extension that validates schema references in SQL files against a per-project allowlist.
Features
Schema validation
Flags schema names in SQL statements that aren’t in your project’s allowed list.
Supported forms
Works with:
schema.table
[schema].table
"schema".table
Automatic analysis
Runs on file open, save, and as you type (debounced for performance).
Workspace configuration
Each project can define its own allowed schemas in .vscode/settings.json .
Warnings only
Disallowed schemas are always shown as warnings (yellow squiggles) in the editor and Problems panel.
Getting Started
Install the extension (from .vsix or the VS Code Marketplace).
In your project folder, create or edit .vscode/settings.json :
{
"sqlSchemaGuard.allowedSchemas": ["dbo", "sales", "reporting"]
}
| |