[PATCH] devtools: improve output of SPDX check

Thomas Monjalon thomas at monjalon.net
Fri Feb 17 22:25:31 CET 2023


When printing the check result in the middle of other checks,
it helps to get a bit of context about which check it is.

In quiet mode, no need to print result if all is OK.

Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
---
 devtools/check-spdx-tag.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/devtools/check-spdx-tag.sh b/devtools/check-spdx-tag.sh
index 7624778a8c..191d4a9906 100755
--- a/devtools/check-spdx-tag.sh
+++ b/devtools/check-spdx-tag.sh
@@ -62,9 +62,9 @@ trap 'rm -f -- "$tmpfile"' INT TERM HUP EXIT
 
 check_spdx
 $quiet || echo
-
 check_boilerplate
-
 $quiet || echo
-echo "total: $errors errors, $warnings warnings"
+$quiet && [ $errors -eq 0 ] && [ $warnings -eq 0 ] ||
+echo "SPDX tag check: $errors errors, $warnings warnings"
+
 exit $errors
-- 
2.39.1



More information about the dev mailing list