Skip to content

Commit 05e2d07

Browse files
committed
Exclude Kubernetes YAML files from pre-commit YAML validation
Multi-document YAML files (with --- separators) are valid for Kubernetes but cause the check-yaml hook to fail. Exclude local/*-environment.yaml and local/*.yaml files from validation.
1 parent fffd429 commit 05e2d07

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ repos:
1515
name: Fix end of files
1616
- id: check-yaml
1717
name: Check YAML syntax
18+
exclude: '(local/.*-environment\.yaml|local/.*\.yaml)$' # Exclude K8s multi-document YAML files
1819
- id: check-json
1920
name: Check JSON syntax
2021
files: '\.(json|manifest)$'

0 commit comments

Comments
 (0)