Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>TSQLRefineNew to Visual Studio Code? Get it now.
TSQLRefine

TSQLRefine

Masaki Ikeda

|
15 installs
| (0) | Free
T-SQL linter integration for VS Code using TSQLRefine
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

TSQLRefine

License: MIT Version VS Code CI Visual Studio Marketplace Version Visual Studio Marketplace Installs

A lightweight Visual Studio Code extension that integrates TSQLRefine into your editor, providing real-time linting, auto-fixing, and formatting for T-SQL files.

Features

  • Lint - Real-time linting on save, type, and open with severity filtering
  • Fix - Auto-fix issues via command or quick fix action
  • Format - Format T-SQL with editor integration and format-on-save support

For details, see Features.

Quick Start

1. Install TSQLRefine CLI

dotnet tool install -g TSQLRefine

Other options: Chocolatey (choco install tsqlrefine) or GitHub Releases. See the TSQLRefine installation guide for more.

2. Install this extension

Install TSQLRefine from the VS Code Marketplace, or search masmgr.tsqlrefine in the Extensions view (Ctrl+Shift+X).

3. Open a .sql file

Linting runs automatically when you open or save a SQL file. You can also use the Command Palette (Ctrl+Shift+P):

Command Description
TSQLRefine: Run Lint the current file
TSQLRefine: Format Format the current file
TSQLRefine: Fix Auto-fix issues in the current file

Typical Use Cases

  • Formatting and linting SQL files before committing
  • Catching errors in stored procedures without running them
  • Enforcing team-wide SQL style consistency
  • Integrating static analysis into CI pipelines

Extension Settings

All settings are under the tsqlrefine namespace: executable path, lint behavior, timeouts, and feature toggles.

For the full settings reference and configuration examples, see Settings.

Supported Languages

This extension activates for files with the following language IDs:

  • sql
  • tsql
  • mssql

Troubleshooting

"tsqlrefine not found"

  1. Verify installation: tsqlrefine --version
  2. If not in PATH, set tsqlrefine.path in settings
  3. Restart VS Code after changing settings

Linting is slow or times out

  1. Increase timeout: "tsqlrefine.timeoutMs": 30000
  2. Disable run-on-type: "tsqlrefine.runOnType": false

Config file not being used

  1. Leave configPath empty for auto-detection
  2. Or set explicitly: "tsqlrefine.configPath": "${workspaceFolder}/tsqlrefine.json"

Contributing

Issues and pull requests are welcome!

  • Report issues at the GitHub repository
  • See DEVELOPMENT.md for development guidelines
  • Run npm run verify to execute the full check suite

About This Extension

This extension serves as an alternative to tsqlrefine-vscode-extension. The original extension references an outdated version of TSQLRefine, so this project was created to enable integration with the latest TSQLRefine releases.

License

MIT License - see the LICENSE file for details.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft