From 95efab3c7a9bce87987740c91dbb1d1325679168 Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Sat, 29 Dec 2018 21:18:54 +0200 Subject: [PATCH] Added pre-commit hook. --- .pre-commit-hooks.yaml | 7 +++++++ README.md | 12 ++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 .pre-commit-hooks.yaml 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 -- GitLab