blob: 2418cdf249fcc8dc68598fa0196ef623f0691a87 [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]$" | \
17 xargs grep -Hn '^[[:space:]][[:space:]]*[a-z][a-z]*:[[:space:]]*$' | \
18 grep -v "[^a-z_]default:"