-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
60 lines (56 loc) · 2.27 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
# SPDX-FileCopyrightText: none
# SPDX-License-Identifier: CC0-1.0
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
# Prevent giant files from being committed
- id: check-added-large-files
# Simply check whether files parse as valid python
- id: check-ast
# Require literal syntax when initializing empty or zero Python builtin types
- id: check-builtin-literals
# Check for files that would conflict in case-insensitive filesystems
- id: check-case-conflict
# Checks for a common error of placing code before the docstring
- id: check-docstring-first
# Ensures that (non-binary) executables have a shebang
- id: check-executables-have-shebangs
# Check for files that contain merge conflict strings
- id: check-merge-conflict
# Checks that scripts with shebangs are executable
- id: check-shebang-scripts-are-executable
# Checks for symlinks which do not point to anything
- id: check-symlinks
# This hook checks yaml files for parseable syntax
- id: check-yaml
# Check for debugger imports and py37+ breakpoint() calls in python source
- id: debug-statements
# Detects the presence of private keys
- id: detect-private-key
# Ensures that a file is either empty, or ends with one newline
- id: end-of-file-fixer
# removes UTF-8 byte order marker
- id: fix-byte-order-marker
# Replaces or checks mixed line ending
- id: mixed-line-ending
# Assert that files in tests/ end in _test.py
- id: name-tests-test
# Protect specific branches from direct checkins
- id: no-commit-to-branch
args: ["--branch", "main", "--branch", "master"]
# This hook trims trailing whitespace
- id: trailing-whitespace
# Check for missing licensing and copyright information.
# The REUSE helper tool assists with achieving and confirming REUSE compliance.
# See: https://reuse.software/
- repo: https://github.com/fsfe/reuse-tool
rev: v5.0.2
hooks:
- id: reuse
ci:
autofix_commit_msg: |
* - auto fixes from pre-commit hooks
for more information, see https://pre-commit.ci
autofix_prs: false
autoupdate_commit_msg: 'ci - pre-commit autoupdate'