diff options
| author | Fuwn <[email protected]> | 2021-05-20 15:05:21 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-05-20 15:05:21 -0700 |
| commit | 7498cd5e72a3de3f0c7831baf6b5de9de3f61690 (patch) | |
| tree | 1585d4b7f88b963f95efd2c684c93ba082a0ceda /.husky/pre-commit | |
| parent | style(migrations): fix sql linting errors (diff) | |
| download | whirl-7498cd5e72a3de3f0c7831baf6b5de9de3f61690.tar.xz whirl-7498cd5e72a3de3f0c7831baf6b5de9de3f61690.zip | |
ci: sql linting on commit, make task
Diffstat (limited to '.husky/pre-commit')
| -rw-r--r-- | .husky/pre-commit | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/.husky/pre-commit b/.husky/pre-commit index 58248c1..82d5a4b 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,12 @@ #!/bin/sh . "$(dirname "$0")/_/husky.sh" +# Check if formatting in Rust source files is per standard. cargo fmt + +# Check if SQLFluff is installed on the system, if it is, run the linting +# subroutine on SQL source files. +if command -v sqlfluff > /dev/null; then + sqlfluff lint migrations/ +fi + |