forked from oracle/accelerated-data-science
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
51 lines (51 loc) · 1.54 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
45
46
47
48
49
50
51
repos:
# Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-ast
exclude: ^docs/
- id: check-docstring-first
exclude: ^(docs/|tests/)
- id: check-json
- id: check-merge-conflict
- id: check-yaml
args: ['--allow-multiple-documents']
- id: detect-private-key
- id: end-of-file-fixer
exclude: '\.ipynb?$'
- id: pretty-format-json
args: ['--autofix']
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
exclude: ^docs/
# Black, the code formatter, natively supports pre-commit
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
exclude: ^docs/
# Regex based rst files common mistakes detector
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: rst-backticks
files: ^docs/
- id: rst-inline-touching-normal
files: ^docs/
# Hardcoded secrets and ocids detector
- repo: https://github.com/gitleaks/gitleaks
rev: v8.17.0
hooks:
- id: gitleaks
exclude: .github/workflows/reusable-actions/set-dummy-conf.yml
# Oracle copyright checker
- repo: https://github.com/oracle-samples/oci-data-science-ai-samples/
rev: cbe0136f7aaffe463b31ddf3f34b0e16b4b124ff
hooks:
- id: check-copyright
name: check-copyright
entry: .pre-commit-scripts/check-copyright.py
language: script
types_or: ['python', 'shell', 'bash']
exclude: ^docs/