From e43a29e3c6ccb3c0bcdc657a8d4d8fd10c1dcfd0 Mon Sep 17 00:00:00 2001 From: Justin Hiemstra <75916364+jhiemstrawisc@users.noreply.github.com> Date: Thu, 14 Sep 2023 11:15:52 -0500 Subject: [PATCH] Add the --allow-multiple-documents flag to check-yaml hook 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. --- .pre-commit-config.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 74abc3b88..12dba4bf9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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