Skip to content

Commit

Permalink
Add the --allow-multiple-documents flag to check-yaml hook
Browse files Browse the repository at this point in the history
Yaml files with multiple `---` separators are considered "multiple-document yaml files." Without the addition of the `--allow-multiple-documents` flag to the check-yaml hook, parsing these will fail.
  • Loading branch information
jhiemstrawisc authored Sep 14, 2023
1 parent 188af9d commit e43a29e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ repos:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
# Multi-documents are yaml files with multiple --- separating blocks, like
# in our docs/parameters.yaml. We need this argument so those parse.
args: [--allow-multiple-documents]
- id: check-added-large-files
- repo: https://github.com/golangci/golangci-lint
rev: v1.54.2
Expand Down

0 comments on commit e43a29e

Please sign in to comment.