summaryrefslogtreecommitdiff
path: root/util/lint/lint-stable-004-style-labels
blob: 2418cdf249fcc8dc68598fa0196ef623f0691a87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env sh
#
# SPDX-License-Identifier: GPL-2.0-only

# DESCR: Check that C labels begin at start-of-line

LINTDIR="$(
  cd -- "$(dirname "$0")" > /dev/null 2>&1 || return
  pwd -P
)"

# shellcheck source=helper_functions.sh
. "${LINTDIR}/helper_functions.sh"

${FIND_FILES} | \
	grep "^src/.*\.[csS]$" | \
	xargs grep -Hn '^[[:space:]][[:space:]]*[a-z][a-z]*:[[:space:]]*$' | \
	grep -v "[^a-z_]default:"