X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=devtools%2Fcheck-git-log.sh;h=23c6a7d9bbba12cfd164eefc618b0bbed5a7c527;hb=1a8cb9199b4e9165e8f67d3aee5504be5952fea5;hp=08fea5d9b7b324904191f6af9265b1c33b93c997;hpb=a8354c99a912e1c2513e113ae07c9e91237f7951;p=dpdk.git diff --git a/devtools/check-git-log.sh b/devtools/check-git-log.sh index 08fea5d9b7..23c6a7d9bb 100755 --- a/devtools/check-git-log.sh +++ b/devtools/check-git-log.sh @@ -16,7 +16,7 @@ print_usage () { by latest git commits limited with -n option, or commits in the git range specified with -r option. e.g. To check only the last commit, ‘-n1’ or ‘-r@~..’ is used. - If no range provided, default is origin/master..HEAD. + If no range provided, default is origin/main..HEAD. END_OF_HELP } @@ -27,7 +27,7 @@ selfdir=$(dirname $(readlink -f $0)) # and allows for specifying the patches to check by passing -nX or -r range. # The old format allows for specifying patches by passing -X or range # as the first argument. -range=${1:-origin/master..} +range=${1:-origin/main..} if [ "$range" = '--help' ] ; then print_usage @@ -89,6 +89,12 @@ bad=$(for commit in $commits ; do done | sed 's,^,\t,') [ -z "$bad" ] || { printf "Wrong headline prefix:\n$bad\n" && failure=true;} +# check headline prefix for libraries +bad=$(echo "$headlines" | grep --color=always \ + -e '^lib/' \ + | sed 's,^,\t,') +[ -z "$bad" ] || { printf "Wrong headline prefix:\n$bad\n" && failure=true;} + # check headline label for common typos bad=$(echo "$headlines" | grep --color=always \ -e '^example[:/]' \ @@ -111,12 +117,12 @@ IFS=' ' words="$selfdir/words-case.txt" for word in $(cat $words); do - bad=$(echo "$headlines" | grep -iw $word | grep -v $word) + bad=$(echo "$headlines" | grep -iw $word | grep -vw $word) if [ "$word" = "Tx" ]; then bad=$(echo $bad | grep -v 'OCTEON\ TX') fi for bad_line in $bad; do - bad_word=$(echo $bad_line | cut -d":" -f2 | grep -io $word) + bad_word=$(echo $bad_line | cut -d":" -f2 | grep -iwo $word) [ -z "$bad_word" ] || { printf "Wrong headline case:\n\ \"$bad_line\": $bad_word --> $word\n" && failure=true;} done