Skip to content
master
Go to file
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
bin
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Build Status Support me

SQLint - a simple SQL linter

About

SQLint is a simple command-line linter which reads your SQL files and reports any syntax errors or warnings it finds.

At this stage, SQLint checks SQL against the ANSI syntax, and uses the PostgreSQL SQL parser to achieve this. In time, we hope to add support for non-standard SQL variants (e.g. MySQL). Contributions are welcome.

Installation

SQLint is currently provided as a ruby gem: you can install it using the following command:

gem install sqlint

Usage

To check the syntax of a file containing SQL, simply pass the filename to sqlint on the command line:

sqlint filename.sql

Editor plugins

Support for sqlint is provided for the following editors:

Using with pre-commit

Add this to your .pre-commit-hooks.yaml:

-   repo: https://github.com/purcell/sqlint
    rev: master
    hooks:
    -   id: sqlint

Authors

This software was written by Steve Purcell and Kieran Trezona-le Comte.

License and copyright

Copyright Powershop NZ Ltd. MIT license.

About

Simple SQL linter supporting ANSI and PostgreSQL syntaxes

Resources

License

Sponsor this project

Learn more about GitHub Sponsors
You can’t perform that action at this time.