diff options
Diffstat (limited to 'scripts/lint-changelog-yaml')
-rwxr-xr-x | scripts/lint-changelog-yaml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/lint-changelog-yaml b/scripts/lint-changelog-yaml new file mode 100755 index 00000000000..402a0c42bd3 --- /dev/null +++ b/scripts/lint-changelog-yaml @@ -0,0 +1,19 @@ +#!/usr/bin/env ruby + +require 'yaml' + +invalid_changelogs = Dir['changelogs/**/*.yml'].reject do |changelog| + begin + YAML.load_file(changelog) + rescue + end +end + +if invalid_changelogs.any? + puts "Changelogs with invalid YAML found!\n" + puts invalid_changelogs.sort + exit 1 +else + puts "All changelogs are valid YAML.\n" + exit 0 +end |