Skip to content

Commit b64526d

Browse files
authored
chore(linters): Add yamlfmt (#824)
1 parent a7f1c12 commit b64526d

File tree

6 files changed

+32
-14
lines changed

6 files changed

+32
-14
lines changed

.codecov.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ codecov:
44
wait_for_ci: false
55

66
require_ci_to_pass: false
7-
8-
token: >- # notsecret # repo-scoped, upload-only, stability in fork PRs
7+
# notsecret # repo-scoped, upload-only, stability in fork PRs
8+
token: >-
99
7316089b-55fe-4646-b640-78d84b79d109
1010
1111
comment:

.github/workflows/ci-cd.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ env:
3737
PYTHONIOENCODING: utf-8
3838
PYTHONUTF8: 1
3939
TOX_PARALLEL_NO_SPINNER: 1 # Disable tox's parallel run spinner animation
40-
TOX_TESTENV_PASSENV: >- # Make tox-wrapped tools see color requests
40+
# Make tox-wrapped tools see color requests
41+
TOX_TESTENV_PASSENV: >-
4142
FORCE_COLOR
4243
MYPY_FORCE_COLOR
4344
NO_COLOR
@@ -396,7 +397,8 @@ jobs:
396397
# `no-commit-to-branch` is skipped because it does not make sense
397398
# in the CI, only locally.
398399
# Ref: https://github.com/pre-commit/pre-commit-hooks/issues/1124
399-
- >- # only affects pre-commit, set for all for simplicity:
400+
# only affects pre-commit, set for all for simplicity:
401+
- >-
400402
SKIP=
401403
hadolint,
402404
no-commit-to-branch,
@@ -448,7 +450,8 @@ jobs:
448450
# NOTE: important results first.
449451
- 3.13
450452
- 3.9
451-
- >- # str
453+
# str
454+
- >-
452455
3.10
453456
- 3.12
454457
- 3.11

.github/workflows/reusable-tox.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ permissions:
8585
contents: read
8686

8787
env:
88-
COLOR: >- # Supposedly, pytest or coveragepy use this
88+
# Supposedly, pytest or coveragepy use this
89+
COLOR: >-
8990
yes
9091
FORCE_COLOR: 1 # Request colored output from CLI tools supporting it
9192
MYPY_FORCE_COLOR: 1 # MyPy's color enforcement
@@ -97,7 +98,8 @@ env:
9798
PYTHONIOENCODING: utf-8
9899
PYTHONUTF8: 1
99100
TOX_PARALLEL_NO_SPINNER: 1
100-
TOX_TESTENV_PASSENV: >- # Make tox-wrapped tools see color requests
101+
# Make tox-wrapped tools see color requests
102+
TOX_TESTENV_PASSENV: >-
101103
COLOR
102104
FORCE_COLOR
103105
MYPY_FORCE_COLOR
@@ -356,7 +358,8 @@ jobs:
356358
!cancelled()
357359
&& failure()
358360
&& inputs.tox-rerun-posargs != ''
359-
run: >- # `exit 1` makes sure that the job remains red with flaky runs
361+
# `exit 1` makes sure that the job remains red with flaky runs
362+
run: >-
360363
python -Im
361364
tox
362365
--parallel auto

.github/workflows/stale-actions.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,8 @@ jobs:
2222
stale-pr-label: stale
2323
stale-issue-message: >
2424
This issue has been automatically marked as stale because it has been
25-
open 30 days
26-
27-
28-
with no activity. Remove stale label or comment or this issue will be
29-
closed in 10 days
25+
open 30 days with no activity. Remove stale label or comment or this
26+
issue will be closed in 10 days
3027
stale-pr-message: >
3128
This PR has been automatically marked as stale because it has been
3229
open 30 days

.pre-commit-config.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,20 @@ repos:
4747
hooks:
4848
- id: gitleaks
4949

50+
#
51+
# YAML Linters
52+
#
53+
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
54+
rev: 0.2.3
55+
hooks:
56+
- id: yamlfmt
57+
args:
58+
- --mapping=2
59+
- --sequence=2
60+
- --offset=0
61+
- --width=75
62+
- --implicit_start
63+
5064
- repo: https://github.com/adrienverge/yamllint.git
5165
rev: v1.35.1
5266
hooks:

.yamllint

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ rules:
1616
false
1717
- >-
1818
true
19-
- >- # Allow "on" key name in GHA CI/CD workflow definitions
19+
# Allow "on" key name in GHA CI/CD workflow definitions
20+
- >-
2021
on

0 commit comments

Comments
 (0)