Skip to content

Commit

Permalink
Add auto-format yaml pre-commit hook (#71)
Browse files Browse the repository at this point in the history
* add google yamlfmt hook

* yamlfmt pre-commit hook pass args -formatter retain_line_breaks=true

---------

Co-authored-by: Janosh Riebesell <janosh.riebesell@gmail.com>
  • Loading branch information
DanielYang59 and janosh authored Sep 24, 2024
1 parent a59d334 commit 97732d7
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ default_install_hook_types: [pre-commit, commit-msg]

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.6
rev: v0.6.7
hooks:
- id: ruff
args:
Expand All @@ -34,14 +34,27 @@ repos:
- id: trailing-whitespace

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

- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
stages: [commit, commit-msg]
args: [--ignore-words-list, gool, --check-filenames]

- repo: https://github.com/google/yamlfmt
rev: v0.13.0
hooks:
- id: yamlfmt
args: [-formatter, retain_line_breaks=true]

- repo: local
hooks:
- id: no-bracket-links
Expand All @@ -63,10 +76,3 @@ repos:
language: pygrep
types: [text]
exclude_types: [python]

- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
stages: [commit, commit-msg]
args: [--ignore-words-list, gool, --check-filenames]

0 comments on commit 97732d7

Please sign in to comment.