forked from sourcegraph/sourcegraph-public-snapshot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
44 lines (44 loc) · 1.34 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
exclude: (^.*\.snap$)|(^internal/database/.*\.json)|(^internal/database/.*\.md)|(^migrations/[^/]+/squashed\.sql)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
exclude: 'pnpm-lock.yaml'
- 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
- 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]