mirror of https://github.com/thesofproject/sof.git
.github/check patch: do not stop on the first failure
Add new script to reduce duplication and ease local testing. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
parent
3bb33ded0a
commit
7baa878610
|
@ -0,0 +1,22 @@
|
|||
#!/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'
|
||||
return $failures
|
||||
}
|
||||
|
||||
main "$@"
|
|
@ -19,7 +19,7 @@ jobs:
|
|||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
PR_NUM: ${{github.event.number}}
|
||||
CHK_CMD: ./scripts/checkpatch.pl --codespell --codespellfile
|
||||
CHK_CMD_OPTS: --codespell --codespellfile
|
||||
/usr/lib/python3/dist-packages/codespell_lib/data/dictionary.txt
|
||||
steps:
|
||||
# depth 2 so:
|
||||
|
@ -42,14 +42,9 @@ jobs:
|
|||
# show what we got
|
||||
git --no-pager log --oneline --graph --decorate --max-count=50
|
||||
|
||||
- name: checkpatch
|
||||
run: while read -r sha ; do
|
||||
printf '\n -------------- \n\n';
|
||||
${CHK_CMD} -g $sha;
|
||||
done < PR_SHAs.txt
|
||||
- name: normal checkpatch
|
||||
run: .github/workflows/checkpatch_list.sh ${CHK_CMD_OPTS} < PR_SHAs.txt
|
||||
|
||||
- name: checkpatch --strict
|
||||
run: while read -r sha ; do
|
||||
printf '\n -------------- \n\n';
|
||||
${CHK_CMD} --strict -g $sha;
|
||||
done < PR_SHAs.txt
|
||||
run: .github/workflows/checkpatch_list.sh ${CHK_CMD_OPTS}
|
||||
--strict < PR_SHAs.txt
|
||||
|
|
Loading…
Reference in New Issue