2023-11-03 08:50:10 +00:00
|
|
|
exclude: (^.*\.snap$)|(^internal/database/.*\.json)|(^internal/database/.*\.md)|(^migrations/[^/]+/squashed\.sql)
|
2023-09-12 14:20:44 +00:00
|
|
|
repos:
|
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
|
|
|
rev: v2.3.0
|
|
|
|
|
hooks:
|
|
|
|
|
- id: check-yaml
|
2024-03-14 15:35:14 +00:00
|
|
|
exclude: 'pnpm-lock.yaml'
|
2023-09-12 14:20:44 +00:00
|
|
|
- id: end-of-file-fixer
|
|
|
|
|
- id: trailing-whitespace
|
|
|
|
|
- repo: https://github.com/keith/pre-commit-buildifier
|
|
|
|
|
rev: 5.0.1
|
|
|
|
|
hooks:
|
|
|
|
|
- id: buildifier
|
|
|
|
|
- id: buildifier-lint
|
|
|
|
|
- repo: local
|
|
|
|
|
hooks:
|
|
|
|
|
- id: check-tokens
|
|
|
|
|
name: check-tokens
|
|
|
|
|
description: 'Check for common tokens being committed'
|
|
|
|
|
entry: ./dev/check-tokens.sh
|
|
|
|
|
language: script
|
|
|
|
|
'types': [text]
|
|
|
|
|
args: []
|
|
|
|
|
require_serial: false
|
2024-01-11 14:16:22 +00:00
|
|
|
- id: shellcheck
|
|
|
|
|
name: shellcheck
|
|
|
|
|
description: 'Run shellcheck'
|
|
|
|
|
entry: ./dev/check/shellcheck.sh
|
|
|
|
|
language: script
|
|
|
|
|
# TODO: adapt shellcheck.sh to only operate on passed-in files,
|
|
|
|
|
# and fallback to git ls-files when empty
|
|
|
|
|
pass_filenames: false
|
|
|
|
|
files: '.*\.(sh|bash)'
|
|
|
|
|
stages: [pre-push]
|
|
|
|
|
- id: shfmt
|
|
|
|
|
name: shfmt
|
|
|
|
|
description: 'Run shfmt'
|
|
|
|
|
entry: ./dev/check/shfmt.sh
|
|
|
|
|
language: script
|
|
|
|
|
# TODO: adapt shfmt.sh to only operate on passed-in files,
|
|
|
|
|
# and fallback to git ls-files when empty
|
|
|
|
|
pass_filenames: false
|
|
|
|
|
files: '.*\.(sh|bash)'
|
|
|
|
|
stages: [pre-push]
|
2024-07-01 18:27:26 +00:00
|
|
|
- id: forbidcommit
|
|
|
|
|
name: forbidcommit
|
|
|
|
|
description: 'Prevent commits with a FORBIDCOMMIT string in the diff'
|
|
|
|
|
entry: ./dev/forbidcommit.sh
|
|
|
|
|
language: script
|