Skip to content

Commit

Permalink
Replace yaml format check with yq
Browse files Browse the repository at this point in the history
Use yq to verify yaml files instead of relying solely on file format
  • Loading branch information
DTLP committed Oct 4, 2023
1 parent 9dcd585 commit 1a4de0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ PROM_VERSION="v2.28.1"

function is_yaml() {
local file=$1
if [[ "${file}" == *yaml || "${file}" == *yml || "${file}" == *yaml.tmpl || "${file}" == *yml.tmpl ]]; then
if yq -v "${file}" ; then
return 0
fi

Expand Down

0 comments on commit 1a4de0e

Please sign in to comment.