Martin Roth | 0ad5fbd | 2020-12-24 12:06:38 -0700 | [diff] [blame] | 1 | #!/usr/bin/env sh |
Martin Roth | 037dbe4 | 2017-06-03 21:15:57 -0600 | [diff] [blame] | 2 | # |
Patrick Georgi | 7333a11 | 2020-05-08 20:48:04 +0200 | [diff] [blame] | 3 | # SPDX-License-Identifier: GPL-2.0-only |
| 4 | |
Martin Roth | 037dbe4 | 2017-06-03 21:15:57 -0600 | [diff] [blame] | 5 | # DESCR: Verify that the word 'coreboot' is lowercase |
| 6 | |
Martin Roth | d81debd | 2022-06-03 00:06:57 -0600 | [diff] [blame] | 7 | LINTDIR="$( |
| 8 | cd -- "$(dirname "$0")" > /dev/null 2>&1 || return |
| 9 | pwd -P |
| 10 | )" |
| 11 | |
| 12 | # shellcheck source=helper_functions.sh |
| 13 | . "${LINTDIR}/helper_functions.sh" |
Martin Roth | 037dbe4 | 2017-06-03 21:15:57 -0600 | [diff] [blame] | 14 | |
Martin Roth | 7e464dc | 2017-09-01 09:22:43 -0600 | [diff] [blame] | 15 | EXCLUDE='^3rdparty/\|util/crossgcc/xgcc\|Binary file\|coreboot\|COREBOOT\|CorebootPayload\|CorebootModule\|minnowboard.org/Coreboot\|.*\.patch$\|CorebootBdsLib\|^payloads/external' |
Martin Roth | 037dbe4 | 2017-06-03 21:15:57 -0600 | [diff] [blame] | 16 | |
Martin Roth | d81debd | 2022-06-03 00:06:57 -0600 | [diff] [blame] | 17 | # # Check last commit message if the code is in a git repo |
| 18 | if [ "${IN_GIT_TREE}" -eq 1 ]; then |
| 19 | if [ -n "$(${GIT} log -n 1 | grep -i 'coreboot' | grep -v "$EXCLUDE" )" ]; then |
Martin Roth | 037dbe4 | 2017-06-03 21:15:57 -0600 | [diff] [blame] | 20 | echo "'coreboot' should be lowercase in commit message" |
| 21 | fi |
Martin Roth | 037dbe4 | 2017-06-03 21:15:57 -0600 | [diff] [blame] | 22 | fi |
| 23 | |
Martin Roth | d81debd | 2022-06-03 00:06:57 -0600 | [diff] [blame] | 24 | ${GREP_FILES} -in "coreboot" | grep -v "$EXCLUDE"; |