Skip to content

Commit e0c34e7

Browse files
[ci] add yaml files linter to pre-commit hook but skip some rules for now (Part 1) (#6763)
Co-authored-by: James Lamb <jaylamb20@gmail.com>
1 parent 0be894d commit e0c34e7

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.pre-commit-config.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ repos:
1717
hooks:
1818
- id: end-of-file-fixer
1919
- id: trailing-whitespace
20+
- repo: https://github.com/adrienverge/yamllint
21+
rev: v1.35.1
22+
hooks:
23+
- id: yamllint
24+
args: ["--strict"]
2025
- repo: https://github.com/astral-sh/ruff-pre-commit
2126
# Ruff version.
2227
rev: v0.8.3

.yamllint.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# default config: https://yamllint.readthedocs.io/en/stable/configuration.html#default-configuration
2+
extends: default
3+
4+
rules:
5+
document-start: disable
6+
line-length:
7+
max: 999 # temporarily increase allowed line length
8+
truthy:
9+
# prevent treating GitHub Workflow "on" key as boolean value
10+
check-keys: false
11+
12+
# temporarily disabled rules
13+
indentation: disable
14+
comments-indentation: disable

0 commit comments

Comments
 (0)