util/lint: Don't check for board_info.txt in common directory

Adjust the linter to skip `common` directories, as a board_info.txt
serves no purpose there.

This also changes `sort | uniq` to `sort -u` for efficiency.

Change-Id: I29639d8b620bcd4f2f7032802f375d79ac391535
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89050
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
This commit is contained in:
Sean Rhodes 2025-09-04 20:48:15 +01:00
commit 5cb36eb16c

View file

@ -12,7 +12,9 @@ LINTDIR="$(
# shellcheck source=helper_functions.sh
. "${LINTDIR}/helper_functions.sh"
for mobodir in $(${FIND_FILES} src/mainboard | sed -n 's,^\(src/mainboard/[^/]*/[^/]*\)/.*$,\1,p'|sort|uniq); do
for mobodir in $(${FIND_FILES} src/mainboard | sed -n 's,^\(src/mainboard/[^/]*/[^/]*\)/.*$,\1,p' \
| grep -v '/common$' | sort -u); do
board_info="$mobodir/board_info.txt"
if ! [ -f "$board_info" ]; then
echo "No $board_info found"