-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy path.pre-commit-config.yaml
79 lines (79 loc) · 3.11 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
default_language_version:
python: python3
fail_fast: true
minimum_pre_commit_version: 2.13.0
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
# Prevent giant files from being committed
- id: check-added-large-files
# Simply check whether the 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 a common error of defining a docstring after code.
- id: check-docstring-first
# Ensures that (non-binary) executables have a shebang.
# - id: check-executables-have-shebangs
# This hook checks json files for parseable syntax.
- id: check-json
# Ensures that (non-binary) files with a shebang are executable.
- id: check-shebang-scripts-are-executable
# This hook sets a standard for formatting JSON files.
- id: pretty-format-json
args: ['--autofix']
# Check for files that contain merge conflict strings.
- id: check-merge-conflict
# Checks for symlinks which do not point to anything.
- id: check-symlinks
# This hook checks toml files for parseable syntax.
- id: check-toml
# Ensures that links to vcs websites are permalinks.
- id: check-vcs-permalinks
# This hook checks xml files for parseable syntax.
- id: check-xml
# 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 symlinks which are changed to regular files with a content of a path which that symlink was pointing to.
- id: destroyed-symlinks
# 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
# Sort the lines in specified files (defaults to alphabetical). You must provide list of target files as input in your .pre-commit-config.yaml file.
- id: file-contents-sorter
# removes UTF-8 byte order marker
- id: fix-byte-order-marker
# Add # -*- coding: utf-8 -*- to the top of python files
- id: fix-encoding-pragma
# Prevent addition of new git submodules
- id: forbid-new-submodules
# Replaces or checks mixed line ending
- id: mixed-line-ending
# This verifies that test files are named correctly
- id: name-tests-test
# Sorts entries in requirements.txt
- id: requirements-txt-fixer
# Sorts simple YAML files which consist only of top-level keys, preserving comments and blocks.
- id: sort-simple-yaml
# This hook trims trailing whitespace.
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: '23.7.0'
hooks:
- id: black
# - repo: https://github.com/PyCQA/flake8
# rev: '6.1.0'
# hooks:
# - id: flake8
# args: ['--ignore=E501']
- repo: https://github.com/jendrikseipp/vulture
rev: 'v2.9.1' # or any later Vulture version
hooks:
- id: vulture
args: ['scan.py', ]