A configurable linting tool that identifies and reports anti-patterns in TSQL scripts.
TSQLLint is a configurable linting tool for TSQL that identifies and reports anti-patterns in SQL scripts. It helps developers enforce coding standards, prevent common SQL mistakes, and maintain consistency across database codebases. The tool integrates with development workflows through CLI usage, IDE extensions, and custom plugins.
Database developers, SQL Server administrators, and teams working with TSQL codebases who need to enforce coding standards and improve SQL code quality.
TSQLLint provides specialized TSQL linting with extensive configurability, SQL Server compatibility alignment, and extensibility through plugins, making it a dedicated alternative to generic SQL linters.
Configurable linting for TSQL
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Rules can be individually set to 'off', 'warning', or 'error' via a .tsqllintrc file, allowing teams to enforce custom coding standards precisely, as detailed in the rule configuration section.
Supports SQL Server compatibility levels from 80 to 150, enabling linting that matches specific database version settings, which is configurable both globally and per-file via inline comments.
Allows creation of custom .NET plugins to implement additional linting rules, providing flexibility for specialized needs, as demonstrated with the sample plugin code in the README.
Includes a Visual Studio Code extension and integration with SQL Server Management Studio via external tools, facilitating seamless use in development environments without manual CLI calls.
Offers a --fix flag to automatically correct certain rule violations, reducing manual cleanup effort, though it is limited to specific rules as mentioned in the documentation.
Custom plugins must be developed in .NET and target net6.0, which can be a barrier for teams not familiar with or invested in the .NET ecosystem, limiting community contributions.
The auto-fix feature only applies to 'certain rule violations,' not all, meaning many issues still require manual intervention, as admitted in the README without specifying which rules are covered.
Creating plugins requires implementing specific interfaces like IPlugin and understanding TSqlFragmentVisitor, which has a steeper learning curve compared to simpler, configuration-based linting tools.