Martin Roth | 0ad5fbd | 2020-12-24 12:06:38 -0700 | [diff] [blame] | 1 | #!/usr/bin/env sh |
Patrick Georgi | 533ec00 | 2012-03-07 15:49:07 +0100 | [diff] [blame] | 2 | # |
Patrick Georgi | 7333a11 | 2020-05-08 20:48:04 +0200 | [diff] [blame] | 3 | # SPDX-License-Identifier: GPL-2.0-only |
| 4 | |
Patrick Georgi | 533ec00 | 2012-03-07 15:49:07 +0100 | [diff] [blame] | 5 | # DESCR: Check that C labels begin at start-of-line |
| 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 | )" |
Martin Roth | e033053 | 2016-03-30 13:56:23 -0600 | [diff] [blame] | 11 | |
Martin Roth | d81debd | 2022-06-03 00:06:57 -0600 | [diff] [blame] | 12 | # shellcheck source=helper_functions.sh |
| 13 | . "${LINTDIR}/helper_functions.sh" |
Martin Roth | e033053 | 2016-03-30 13:56:23 -0600 | [diff] [blame] | 14 | |
| 15 | ${FIND_FILES} | \ |
| 16 | grep "^src/.*\.[csS]$" | \ |
Patrick Georgi | 1d029b4 | 2023-10-06 20:19:15 +0200 | [diff] [blame] | 17 | grep -v "^src/vendorcode/wuffs/" | \ |
Martin Roth | e033053 | 2016-03-30 13:56:23 -0600 | [diff] [blame] | 18 | xargs grep -Hn '^[[:space:]][[:space:]]*[a-z][a-z]*:[[:space:]]*$' | \ |
| 19 | grep -v "[^a-z_]default:" |