Skip to content

Commit 97732d7

Browse files
DanielYang59janosh
andauthored
Add auto-format yaml pre-commit hook (#71)
* add google yamlfmt hook * yamlfmt pre-commit hook pass args -formatter retain_line_breaks=true --------- Co-authored-by: Janosh Riebesell <[email protected]>
1 parent a59d334 commit 97732d7

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

.pre-commit-config.yaml

+15-9
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ default_install_hook_types: [pre-commit, commit-msg]
77

88
repos:
99
- repo: https://github.com/astral-sh/ruff-pre-commit
10-
rev: v0.6.6
10+
rev: v0.6.7
1111
hooks:
1212
- id: ruff
1313
args:
@@ -34,14 +34,27 @@ repos:
3434
- id: trailing-whitespace
3535

3636
- repo: https://github.com/igorshubovych/markdownlint-cli
37-
rev: v0.41.0
37+
rev: v0.42.0
3838
hooks:
3939
- id: markdownlint
4040
# MD013: line length
4141
# MD033: no inline HTML
4242
# MD041: first line in a file should be a top-level heading
4343
args: [--disable, MD013, MD033, MD041, "--"]
4444

45+
- repo: https://github.com/codespell-project/codespell
46+
rev: v2.3.0
47+
hooks:
48+
- id: codespell
49+
stages: [commit, commit-msg]
50+
args: [--ignore-words-list, gool, --check-filenames]
51+
52+
- repo: https://github.com/google/yamlfmt
53+
rev: v0.13.0
54+
hooks:
55+
- id: yamlfmt
56+
args: [-formatter, retain_line_breaks=true]
57+
4558
- repo: local
4659
hooks:
4760
- id: no-bracket-links
@@ -63,10 +76,3 @@ repos:
6376
language: pygrep
6477
types: [text]
6578
exclude_types: [python]
66-
67-
- repo: https://github.com/codespell-project/codespell
68-
rev: v2.3.0
69-
hooks:
70-
- id: codespell
71-
stages: [commit, commit-msg]
72-
args: [--ignore-words-list, gool, --check-filenames]

0 commit comments

Comments
 (0)