forked from freelawproject/x-ray
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
49 lines (45 loc) · 1.35 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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: migrations
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
args: [--maxkb=5000]
- id: check-ast
- id: check-json
- id: check-merge-conflict
- id: check-toml
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
- id: check-byte-order-marker
- id: fix-encoding-pragma
args: [--remove]
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
- repo: https://github.com/ikamensh/flynt/
rev: '0.77'
hooks:
- id: flynt
args: [--line-length=79, --transform-concats]
- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.11.4
hooks:
- id: isort
name: isort (python)
#
# Tried and Failed
#
# 1. I tried doing mypy too, but it was a mess because it runs in its own
# isolated environment, that lacks all our dependencies.
# 2. We might want flake8 someday. It's easy to turn on, but it's so noisy on
# our current code that it'd take some fine-tuning to get it right.
# 3. semgrep was too slow and had to be moved to a github action.