2021-03-09 03:55:49 +08:00
|
|
|
#!/bin/sh
|
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# The purpose of this script is not to stop on the first checkpatch
|
|
|
|
# failure and report at the end instead.
|
|
|
|
#
|
|
|
|
# Sample invocation:
|
|
|
|
# $0 --codespell --strict < PR_SHAs.txt
|
|
|
|
main()
|
|
|
|
{
|
|
|
|
local failures=0
|
|
|
|
while read -r sha ; do
|
|
|
|
printf '\n -------------- \n\n'
|
|
|
|
./scripts/checkpatch.pl $@ -g $sha || failures=$((failures+1))
|
|
|
|
done
|
|
|
|
printf '\n -------------- \n\n'
|
2023-01-11 04:02:37 +08:00
|
|
|
|
|
|
|
if [ $failures -ne 0 ]; then
|
|
|
|
cat .github/workflows/SPDX-README.md
|
|
|
|
fi
|
|
|
|
|
2021-03-09 03:55:49 +08:00
|
|
|
return $failures
|
|
|
|
}
|
|
|
|
|
|
|
|
main "$@"
|