-
Notifications
You must be signed in to change notification settings - Fork 30
/
.pre-commit-config.yaml
85 lines (79 loc) · 3.18 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
# SPDX-FileCopyrightText: none
# SPDX-License-Identifier: CC0-1.0
# We exclude src/ssdeep-lib/ from some check because we don't
# want to fix external code in this repository
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
# Forbid files which have a UTF-8 byte-order marker
- id: check-byte-order-marker
# 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
# 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 for symlinks which do not point to anything
- id: check-symlinks
# This hook checks yaml files for parseable syntax
- id: check-yaml
files: .drone.yml
# Drone CI config allows and requires multiple documents
args: [--allow-multiple-documents]
- id: check-yaml
exclude: .drone.yml
# 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
exclude: ^(src/ssdeep-lib/)
# Replaces or checks mixed line ending
- id: mixed-line-ending
exclude: ^(src/ssdeep-lib/)
# This hook trims trailing whitespace
- id: trailing-whitespace
exclude: ^(src/ssdeep-lib/)
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.6.0
hooks:
# Enforce that `noqa` annotations always occur with specific codes
- id: python-check-blanket-noqa
# Prevent common mistakes of `assert mck.not_called()`, `assert mck.called_once_with(...)` and `mck.assert_called`
- id: python-check-mock-methods
# A quick check for the `eval()` built-in function
- id: python-no-eval
# A quick check for the deprecated `.warn()` method of python loggers
- id: python-no-log-warn
# Enforce that python3.6+ type annotations are used instead of type comments
- id: python-use-type-annotations
# Detect common mistake of using single backticks when writing rst
- id: rst-backticks
# Detect mistake of inline code touching normal text in rst
- id: rst-inline-touching-normal
# Forbid files which have a UTF-8 Unicode replacement character
- id: text-unicode-replacement-char
- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.2
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear
- flake8-implicit-str-concat
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.782
hooks:
- id: mypy
args: [--ignore-missing-imports]
exclude: ^(docs/|setup.py)
# Unable to exclude src/ssdeep-lib
# # 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: v0.11.1
# hooks:
# - id: reuse
# exclude: ^(src/ssdeep-lib/)