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
}
# 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
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[:/]' \
'
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