| 1 | #!/usr/bin/env sh |
| 2 | # |
| 3 | # SPDX-License-Identifier: GPL-2.0-only |
| 4 | |
| 5 | # DESCR: Check that C labels begin at start-of-line |
| 6 | |
| 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" |
| 14 | |
| 15 | ${FIND_FILES} | \ |
| 16 | grep "^src/.*\.[csS]$" | \ |
| 17 | grep -v "^src/vendorcode/wuffs/" | \ |
| 18 | xargs grep -Hn '^[[:space:]][[:space:]]*[a-z][a-z]*:[[:space:]]*$' | \ |
| 19 | grep -v "[^a-z_]default:" |