This repository contains T-SQL language plug-in for Sonar.

!!! IMPORTANT!!! This plugin will no longer be updated. Please use sonar-sql-plugin instead as it supports multiple dialects and contains various code fixes.


Currently plug-in supports:


You can support this project and others via Paypal

Support via PayPal


  1. Download and install SonarQube
  2. Download plug-in from the releases and copy it to sonarqube's extensions\downloads directory
  3. Start SonarQube and enable rules
  4. If you want plug-in to automatically run SQL Code guard analysis part, please install SQL Code Guard onto your build machines and make sure that property is set to an existing installation (default is C:\Program Files (x86)\SqlCodeGuard\SqlCodeGuard.Cmd.exe)
  5. If you want plug-in to import issues found by Microsoft, please before running a sonar analysis build solution with setting /p:RunSqlCodeAnalysis=true.
  6. If you want coverage to be reported - please run SQLCover before running sonar analysis

You can find more information on configuration at wiki at Getting started on how to configure external tools.


Options which are available for overriding can be found at Configuration.

CI integration

TFS integration

For T-SQL code to be scanned from TFS Build, the easiest way to start is to install:

After having done this, please use and configure SonarQube Scanner CLI step in your build definition.