devtools: improve output of SPDX check

Message ID 20230217212532.2877388-1-thomas@monjalon.net (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series devtools: improve output of SPDX check |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-abi-testing success Testing PASS

Commit Message

Thomas Monjalon Feb. 17, 2023, 9:25 p.m. UTC
  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@monjalon.net>
---
 devtools/check-spdx-tag.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
  

Patch

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