Skip to content

Commit f2881d2

Browse files
committed
ci: unify pre-commit configuration
Use the same set of pre-commit tools as other projects. Refs: PT-1952
1 parent cd6ee6b commit f2881d2

1 file changed

Lines changed: 21 additions & 17 deletions

File tree

.pre-commit-config.yaml

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,39 @@
1-
# Pre-commit hook documentation:
2-
# - https://pre-commit.com/
3-
# - https://pre-commit.com/hooks.html
4-
#
5-
# Ruff pre-commit hook documentation:
6-
# - https://github.com/astral-sh/ruff-pre-commit
71
default_language_version:
8-
python: python3
2+
python: python3
3+
default_install_hook_types: [pre-commit, commit-msg]
4+
default_stages: [pre-commit, manual]
95
repos:
6+
- repo: https://github.com/pre-commit/pre-commit-hooks
7+
rev: v6.0.0
8+
hooks:
9+
- id: trailing-whitespace
10+
- id: end-of-file-fixer
11+
exclude: notification_importers/templates/sms/
12+
- id: check-yaml
13+
- id: check-toml
14+
- id: check-added-large-files
1015
- repo: https://github.com/astral-sh/ruff-pre-commit
1116
# NOTE: Don't move the trailing "ruff-pre-commit version" comment from
1217
# the ruff's version line, it is used by test_pre_commit_ruff_version.py
1318
# test case in order not to have to add a YAML library dependency just
1419
# to test this version:
15-
rev: v0.10.0 # ruff-pre-commit version
20+
rev: v0.12.12 # ruff-pre-commit version
1621
hooks:
1722
# Run the linter
1823
- id: ruff
1924
args: [ --fix ]
2025
# Run the formatter
2126
- id: ruff-format
22-
- repo: https://github.com/compilerla/conventional-pre-commit
23-
rev: v4.0.0
27+
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
28+
rev: v9.22.0
2429
hooks:
25-
- id: conventional-pre-commit
26-
stages: [commit-msg]
27-
args: []
28-
- repo: https://github.com/jorisroovers/gitlint
29-
rev: v0.19.1
30+
- id: commitlint
31+
stages: [ commit-msg, manual ]
32+
additional_dependencies: [ "@commitlint/config-conventional" ]
33+
- repo: https://github.com/koalaman/shellcheck-precommit
34+
rev: v0.11.0
3035
hooks:
31-
- id: gitlint
32-
stages: [commit-msg]
36+
- id: shellcheck
3337
- repo: https://github.com/frnmst/md-toc
3438
rev: 9.0.0
3539
hooks:

0 commit comments

Comments
 (0)