-
Notifications
You must be signed in to change notification settings - Fork 3
/
.pre-commit-config.yaml
64 lines (61 loc) · 2.06 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
# To install the dependencies for this file:
# 1) pip install pre-commit
# (really, "sudo python3 -m pip install pre-commit")
# (really, I've been carrying this boilerplate for years, but now it's all python3?)
#
# 2) pre-commit install --allow-missing-config
#
# yamllint checks this .pre-commit-config file as well
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
---
# Commitizen runs in commit-msg stage
# but we don't want to run the other hooks on commit messages
default_stages: [commit]
repos:
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.32.0
hooks:
- id: yamllint
args: ["-d", "{extends: relaxed, rules: {line-length: {max: 120}}}"]
# Enforce that commit messages allow for later changelog generation
- repo: https://github.com/commitizen-tools/commitizen
rev: 3.12.0
hooks:
# Requires that commitizen is already installed
- id: commitizen
stages: [commit-msg]
# Check formatting and lint for starlark code
- repo: https://github.com/keith/pre-commit-buildifier
rev: 6.3.3.1
hooks:
- id: buildifier
- id: buildifier-lint
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.3"
hooks:
- id: prettier
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: no-commit-to-branch
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 23.10.1
hooks:
- id: black
language_version: python3
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.27.0
hooks:
- id: check-github-workflows
- id: check-renovate
- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v7.3.2
hooks:
- id: cspell
# a local allowlist of dictionary words in .github/cspell.yaml. This can get comical --
# adding new words in every PR -- but the cost/benefit balance may avoid some embarassing
# typos
args: ["--config", ".github/cspell.yaml"]
types: [file, markdown]