-
Notifications
You must be signed in to change notification settings - Fork 76
/
.pre-commit-config.yaml
110 lines (110 loc) · 3.77 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
105
106
107
108
109
110
---
default_stages: [commit, push]
default_language_version:
# force all unspecified Python hooks to run python3
python: python3
minimum_pre_commit_version: "1.20.0"
repos:
- repo: meta
hooks:
- id: identity
- id: check-hooks-apply
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-ast
- id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
exclude: ^rubycritic/assets.*$
- id: check-json
- id: check-merge-conflict
- id: check-toml
- id: check-xml
exclude: ^docs/assets/xsl/rss\.xsl$|^docs/feed\.xslt\.xml$|^docs/opensearch\.xml$|^docs/rss\.xml$|^logorama/feed\.xml$
- id: check-yaml
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
exclude: ^charts/assets/.*$|^charts/lang/README\.de\.md$|^charts/log\.txt$|^charts/README\.md$|^docs/assets/js/.*$|^docs/assets/games/.*$|^rubycritic/.*$|^seek/job_ind\.json$
- id: file-contents-sorter
files: ^requirements.txt$
args: [--unique]
- id: fix-byte-order-marker
- id: mixed-line-ending
# - id: pretty-format-json
- id: requirements-txt-fixer
- id: trailing-whitespace
exclude: ^rubycritic/.*$
- repo: https://github.com/psf/black
rev: 24.1.1
hooks:
- id: black
name: Run black on Python files
# - repo: https://github.com/asottile/dead
# rev: v1.5.0
# hooks:
# - id: dead
# name: Dead simple Python dead code detection
# exclude: ^doc/source/conf\.py$|^scrapers/python/scrapy/github/spider\.py$
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
- id: markdownlint # Configure in .mdlrc
- id: reek
- id: rubocop
args: ["--autocorrect-all"]
- id: shellcheck
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.4
hooks:
- id: forbid-tabs
exclude: ^doc/Makefile$|go\.mod$|go\.sum$|^go\.work$|^rubycritic/assets.*$|.*\.go|.*\.sh$
- id: remove-tabs
exclude: ^doc/Makefile$|go\.mod$|go\.sum$|^go\.work$|^rubycritic/assets.*$|.*\.go|.*\.sh$
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-check-mock-methods
- id: python-no-eval
- id: python-no-log-warn
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.39.0
hooks:
- id: markdownlint
name: Run markdownlint
entry: markdownlint -c .github/linters/.markdown-lint.yml .
args: [--ignore=doc/venv, --ignore=node_modules, --ignore=charts/assets/js/d3/CHANGES.md]
- repo: https://github.com/adrienverge/yamllint
rev: v1.33.0
hooks:
- id: yamllint
name: Check YAML files with yamllint
entry: yamllint --strict -c .github/linters/.yaml-lint.yml .
types: [yaml]
- repo: https://github.com/PyCQA/bandit
rev: 1.7.7
hooks:
- id: bandit
- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: flake8
entry: flake8 --config=".github/linters/.flake8"
- repo: https://github.com/pycqa/pylint
rev: v3.0.3
hooks:
- id: pylint
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
entry: codespell -I codespell.txt ./doc/source
exclude: ^assets/.*$|^charts/.*$|^docs/assets/.*$|^eclipse-cheatsheets-to-dita-to-pdf/.*$|^Gemfile\.lock$|^go\.sum$|^go\.work\.sum$|^logorama/.*$|^rubycritic/.*$|^ruby-eclipse-cheatsheets-to-dita/.*$|^tests/spelling/.*$|^seek/job_ind\.json$
# - repo: https://github.com/syntaqx/git-hooks
# rev: v0.0.16
# hooks:
# - id: go-fmt
# - id: go-test
# - id: go-mod-tidy