blob: dbb10acd288297449b666c34c96c2294b45f19d9 [file] [log] [blame]
Martin Roth0ad5fbd2020-12-24 12:06:38 -07001#!/usr/bin/env sh
Patrick Georgi533ec002012-03-07 15:49:07 +01002#
Patrick Georgi7333a112020-05-08 20:48:04 +02003# SPDX-License-Identifier: GPL-2.0-only
4
Patrick Georgi533ec002012-03-07 15:49:07 +01005# DESCR: Check that C labels begin at start-of-line
6
Martin Rothd81debd2022-06-03 00:06:57 -06007LINTDIR="$(
8 cd -- "$(dirname "$0")" > /dev/null 2>&1 || return
9 pwd -P
10)"
Martin Rothe0330532016-03-30 13:56:23 -060011
Martin Rothd81debd2022-06-03 00:06:57 -060012# shellcheck source=helper_functions.sh
13. "${LINTDIR}/helper_functions.sh"
Martin Rothe0330532016-03-30 13:56:23 -060014
15${FIND_FILES} | \
16 grep "^src/.*\.[csS]$" | \
Patrick Georgi1d029b42023-10-06 20:19:15 +020017 grep -v "^src/vendorcode/wuffs/" | \
Martin Rothe0330532016-03-30 13:56:23 -060018 xargs grep -Hn '^[[:space:]][[:space:]]*[a-z][a-z]*:[[:space:]]*$' | \
19 grep -v "[^a-z_]default:"