forked from freelawproject/courtlistener
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
52 lines (48 loc) · 1.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
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: migrations
default_language_version:
python: "python3.11"
ci:
autoupdate_schedule: quarterly
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
- 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
exclude: '^docker/postgresql/cl-postgres.key$|^docker/elastic/cl-es.key$'
- id: fix-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.78'
hooks:
- id: flynt
args: [--line-length=79, --transform-concats]
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
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.