X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=devtools%2Fcheckpatches.sh;fp=scripts%2Fcheckpatches.sh;h=a56c41a301c0429fad83b250204f633b7c480d04;hb=7595afa4d30097c1177b69257118d8ad89a539be;hp=336cc7b41d7b20f5b94d4605568d01944d39f9d3;hpb=ce3d555e43e3795b5d9507fcfc76b7a0a92fd0d6;p=deb_dpdk.git diff --git a/scripts/checkpatches.sh b/devtools/checkpatches.sh similarity index 95% rename from scripts/checkpatches.sh rename to devtools/checkpatches.sh index 336cc7b4..a56c41a3 100755 --- a/scripts/checkpatches.sh +++ b/devtools/checkpatches.sh @@ -44,7 +44,8 @@ options="$options --show-types" options="$options --ignore=LINUX_VERSION_CODE,FILE_PATH_CHANGES,\ VOLATILE,PREFER_PACKED,PREFER_ALIGNED,PREFER_PRINTF,\ PREFER_KERNEL_TYPES,BIT_MACRO,CONST_STRUCT,\ -SPLIT_STRING,LINE_SPACING,PARENTHESIS_ALIGNMENT,NETWORKING_BLOCK_COMMENT_STYLE,\ +SPLIT_STRING,LONG_LINE_STRING,\ +LINE_SPACING,PARENTHESIS_ALIGNMENT,NETWORKING_BLOCK_COMMENT_STYLE,\ NEW_TYPEDEFS,COMPARISON_TO_NULL" print_usage () { @@ -89,12 +90,12 @@ check () { # if [ -n "$1" ] ; then report=$($DPDK_CHECKPATCH_PATH $options "$1" 2>/dev/null) elif [ -n "$2" ] ; then - report=$(git format-patch --no-stat --stdout -1 $commit | + report=$(git format-patch --find-renames --no-stat --stdout -1 $commit | $DPDK_CHECKPATCH_PATH $options - 2>/dev/null) else report=$($DPDK_CHECKPATCH_PATH $options - 2>/dev/null) fi - [ $? -ne 0 ] || continue + [ $? -ne 0 ] || return 0 $verbose || printf '\n### %s\n\n' "$3" printf '%s\n' "$report" | sed -n '1,/^total:.*lines checked$/p' status=$(($status + 1))