-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
104 lines (104 loc) · 3.1 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-ast
- id: check-merge-conflict
- id: check-json
exclude: |
(?x)^(
lib/lp/services/sitesearch/tests/data/bingsearchservice-incomplete-response\.json
)$
- id: check-xml
exclude: |
(?x)^(
lib/lp/bugs/tests/testfiles/broken_bug_li_item\.xml|
lib/lp/bugs/tests/testfiles/unescaped_control_character.xml
)$
- id: check-yaml
- id: debug-statements
exclude: systemdocs\.py
- id: file-contents-sorter
files: ^\.codespell-ignore
- id: no-commit-to-branch
args: [--branch, master, --branch, db-devel]
- repo: https://github.com/asottile/pyupgrade
rev: v3.16.0
hooks:
- id: pyupgrade
args: [--keep-percent-format, --py38-plus]
exclude: |
(?x)^(
lib/contrib/.*
|utilities/community-contributions\.py
)$
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.8.0
hooks:
- id: black
exclude: |
(?x)^(
lib/contrib/.*
|utilities/community-contributions\.py
)$
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
name: isort
args: [--profile, black]
- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8
exclude: ^lib/contrib/
additional_dependencies:
- flake8-absolute-import==1.0.0.1
- flake8-bugbear==23.3.12
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v9.12.0
hooks:
- id: eslint
args: [--quiet]
# 20.7.0 upgraded from npm 9.8.1 to 10.1.0, which appears to fail to
# use the proxy correctly in Launchpad CI builds.
language_version: "20.6.1"
- repo: https://github.com/keewis/blackdoc
rev: v0.3.9
hooks:
- id: blackdoc
args: ["-l", "78"]
exclude: ^doc/.*
- repo: https://git.launchpad.net/lp-lint-doctest
rev: '0.5'
hooks:
- id: lp-lint-doctest
args: [--allow-option-flag, IGNORE_EXCEPTION_MODULE_IN_PYTHON2]
exclude: ^doc/.*
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args: ["-I", ".codespell-ignore"]
files: ^(.*\.js|.*\.rst)$
exclude: |
(?x)^(
# URL-encoding of "foö".
lib/lp/bugs/doc/bugattachments\.rst
# Quoted-printable encoding.
|lib/lp/code/doc/branch-notifications\.rst
# Word truncated by stemming.
|lib/lp/services/database/doc/textsearching\.rst
)$
- repo: https://github.com/get-woke/woke
rev: v0.19.0
hooks:
- id: woke-from-source
files: ^doc/.*\.rst$