-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
94 lines (88 loc) · 2.46 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# default_language_version:
# python: python3.9
default_stages: [ commit ]
files: '^(.*\.(py|sh|md|ya?ml))$'
fail_fast: false
minimum_pre_commit_version: '0'
repos:
# Meta and Local
- repo: meta
hooks:
- id: check-useless-excludes
name: Check useless excludes
- id: identity
name: Identity
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-added-large-files
name: Check for added large files
types: [ file ]
args: [ '--maxkb=100' ]
- id: check-case-conflict
name: Check for case conflicts
- id: check-yaml
name: Check yaml
- id: check-json
name: Check json
- id: check-merge-conflict
name: Check for merge conflicts
- id: check-symlinks
name: Check for symlinks
- id: check-toml
name: Check toml
- id: end-of-file-fixer
name: End of file fixer
- id: trailing-whitespace
name: Trailing whitespace remover
- id: debug-statements
name: Check for pdb and ipdb
- id: detect-aws-credentials
name: Detect AWS credentials
args: [ --allow-missing-credentials ]
- id: detect-private-key
name: Detect private key
# Python
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v2.0.2
hooks:
- id: autopep8
name: Autopep8
- repo: https://github.com/myint/autoflake
rev: 'v2.0.0'
hooks:
- id: autoflake
name: autoflake
args: [ '--in-place', '--remove-all-unused-imports' ]
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: 'v0.0.201'
hooks:
- id: ruff
name: Ruff
args: [ "--fix" ]
# Security issues
- repo: https://github.com/PyCQA/bandit
rev: 1.7.4
hooks:
- id: bandit
name: Bandit
args: [ "-r" , "-c", "pyproject.toml" ]
additional_dependencies: [ "bandit[toml]" ]
# Dockerfile
- repo: https://github.com/pryorda/dockerfilelint-precommit-hooks
rev: v0.1.0
hooks:
- id: dockerfilelint
# Pipeline
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.21.0
hooks:
- id: check-github-workflows
name: Check GitHub workflows
files: ^(.github/workflows/.*\.yml)$
# EditorConfig
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 2.6.1
hooks:
- id: editorconfig-checker
language: python