diff --git a/.pre-commit-hooks.yaml b/.pre-commit-hooks.yaml new file mode 100644 index 0000000..29fca3c --- /dev/null +++ b/.pre-commit-hooks.yaml @@ -0,0 +1,7 @@ +--- +- id: sqlint + name: sqlint + entry: sqlint + language: ruby + minimum_pre_commit_version: 0.15.0 + types: [sql] diff --git a/README.md b/README.md index ffe2e3f..d4c947a 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,18 @@ Support for `sqlint` is provided for the following editors: - VIM, via [Syntastic](https://github.com/scrooloose/syntastic), [Neomake](https://github.com/neomake/neomake) or [ALE](https://github.com/w0rp/ale) - SublimeText, via [SublimeLinter](https://github.com/SublimeLinter/SublimeLinter3/) + +### Using with pre-commit + +Add this to your `.pre-commit-hooks.yaml`: + +```yaml +- repo: https://github.com/purcell/sqlint + rev: master + hooks: + - id: sqlint +``` + ### Authors This software was written by