-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
69 lines (68 loc) · 2.05 KB
/
.pre-commit-config.yaml
File metadata and controls
69 lines (68 loc) · 2.05 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
args: ['--markdown-linebreak-ext=md']
# exclude docs/ tests/ and .github/ directories
exclude: ^(.*/)?(docs|tests|\.github)(/.*)?$
stages:
- 'commit'
- id: end-of-file-fixer
exclude: ^(.*/)?(docs|tests|\.github)(/.*)?$
stages:
- 'commit'
- id: check-yaml
exclude: ^(.*/)?(docs|tests|\.github)(/.*)?$
stages:
- 'commit'
# Disabling while we do notebooks directory cleanup
# - id: check-added-large-files
# args: [--maxkb=1024]
# exclude: ^(.*/)?(docs|tests|\.github)(/.*)?$
# stages:
# - "commit"
- repo: local
hooks:
- id: check_for_notebook_outputs
name: Check for notebook outputs
entry: make ensure-clean-notebooks
language: system
# only run if there are .ipynb files in the commit
types: [jupyter]
stages:
- 'pre-commit'
- id: check_for_credentials
name: Check for exposed credentials
entry: make verify-exposed-credentials
language: system
# only run if there are .ipynb files in the commit
types: [jupyter]
stages:
- 'pre-commit'
- id: generate_test_id_types
name: Running make generate_test_id_types
entry: make generate-test-id-types
language: system
pass_filenames: false
types: [python]
stages:
- 'commit'
- id: format
name: Running make format
entry: ./scripts/format_and_add.sh
language: script
pass_filenames: false
types: [python]
stages:
- 'commit'
- id: lint
name: Running make lint
entry: make lint
language: system
pass_filenames: false
types: [python]
stages:
- 'push'