mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-17 12:46:27 +00:00
If option -p has been specified, run checkpatch on the split out patches instead
of the single large patch. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2359 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -305,11 +305,22 @@ function run_checkpatch {
|
||||
local outputfile="${outputdir}/checkpatch-$1-output.txt"
|
||||
local patchfile="${outputdir}/scst-$1-kernel.patch"
|
||||
|
||||
if [ -e "${outputdir}/linux-$1/scripts/checkpatch.pl" ]
|
||||
then
|
||||
echo "Running checkpatch on the SCST kernel patch ..."
|
||||
( cd "${outputdir}/linux-$1" \
|
||||
&& scripts/checkpatch.pl --no-tree - < "${patchfile}" &> "${outputfile}")
|
||||
if [ -e "${outputdir}/linux-$1/scripts/checkpatch.pl" ]; then
|
||||
if [ "${multiple_patches}" = "false" ]; then
|
||||
echo "Running checkpatch on the SCST kernel patch ..."
|
||||
( cd "${outputdir}/linux-$1" \
|
||||
&& scripts/checkpatch.pl --no-tree --no-signoff - < "${patchfile}" &> "${outputfile}")
|
||||
else
|
||||
echo "Running checkpatch on the SCST kernel patches ..."
|
||||
rm -f "${outputfile}"
|
||||
( cd "${outputdir}/linux-$1" \
|
||||
&& for p in "${outputdir}/${patchdir}"/*
|
||||
do
|
||||
echo "==== $p" >>"${outputfile}"
|
||||
scripts/checkpatch.pl --no-tree --no-signoff - < "$p" >> "${outputfile}" 2>&1
|
||||
done
|
||||
)
|
||||
fi
|
||||
local errors=$(grep -c '^ERROR' "${outputfile}")
|
||||
local warnings=$(grep -c '^WARNING' "${outputfile}")
|
||||
echo "${errors} errors / ${warnings} warnings."
|
||||
|
||||
Reference in New Issue
Block a user