scripts: pre-submit: Be informative on meson formatting failures
Previously the script just silently exited with a failure status.
That's unhelpful to people reading the CI output, so write something
informative.
Change-Id: Ia1b618e004c457d97d1c0f690f74567991cac830
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/scripts/pre-submit b/scripts/pre-submit
index 8d50341..98cd9e5 100755
--- a/scripts/pre-submit
+++ b/scripts/pre-submit
@@ -5,7 +5,14 @@
trap 'rm -rf "$BUILD"' EXIT
meson format --recursive --inplace || true
-git diff --quiet
+if ! git diff --quiet
+then
+ echo Your changes must meet the upstream meson style guide
+ echo
+ echo https://mesonbuild.com/Style-guide.html
+ echo https://mesonbuild.com/Commands.html#format
+ exit 1
+fi
# Make sure if the change touches the public headers, it also updates the
# changelog.