This repository has been archived by the owner on Jun 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.pre-commit-config.yaml
62 lines (61 loc) · 1.62 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
52
53
54
55
56
57
58
59
60
61
62
---
# Install pre-commit via either of these:
# pip install pre-commit
# brew install pre-commit
#
# Enable the current repo for pre-commit:
# pre-commit install
#
# Check current commit:
# pre-commit
#
# Check all files:
# pre-commit run --all-files
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-ast # Python syntax
- id: check-case-conflict # VERSION and version in same repo
- id: check-docstring-first # Python docs
- id: check-executables-have-shebangs # #!/bin/bash
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-xml
- id: check-yaml
- id: debug-statements # Python debug stuff
- id: detect-aws-credentials
args:
- --allow-missing-credentials
- id: detect-private-key
- id: end-of-file-fixer # Forces newline at the end
- id: flake8 # Lint Python stuff
- id: mixed-line-ending
# - id: no-commit-to-branch # Protect master
- id: pretty-format-json
args:
- --autofix
- id: requirements-txt-fixer
- id: sort-simple-yaml
- id: trailing-whitespace
# Install detect-secrets:
# pip install detect-secrets
#
# For every additional repo, generate a known secrets file:
# detect-secrets scan > .secrets.baseline
#
# And whitelist known good stuff:
# detect-secrets audit .secrets.baseline
#
# You can update and whitelist more later:
# detect-secrets scan --update .secrets.baseline
#
# https://github.com/Yelp/detect-secrets
- repo: https://github.com/Yelp/detect-secrets
rev: v0.12.7
hooks:
- id: detect-secrets
args: ["--baseline", ".secrets.baseline"]
exclude: .*/tests/.*
language_version: python3