blob: 0f9725e32b626bb70fe47669e80e32fd91637e4e [file] [log] [blame]
Martin Roth0ad5fbd2020-12-24 12:06:38 -07001#!/usr/bin/env sh
Martin Rothf7906722016-04-06 16:32:37 -06002#
Patrick Georgi7333a112020-05-08 20:48:04 +02003# SPDX-License-Identifier: GPL-2.0-only
4
Martin Rothf7906722016-04-06 16:32:37 -06005# DESCR: Check that variables have fully qualified types
6
Martin Rothd81debd2022-06-03 00:06:57 -06007LINTDIR="$(
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"
Martin Rothf7906722016-04-06 16:32:37 -060014
15INCLUDED_DIRS='^src/\|^util/\|payloads/libpayload\|payloads/coreinfo'
Elyes HAOUAS8297fa12020-02-22 10:37:49 +010016EXCLUDED_DIRS='^src/vendorcode\|cbfstool/lzma\|cbfstool/lz4'
Martin Rothf7906722016-04-06 16:32:37 -060017INCLUDED_FILES='\.[ch]:'
18
Martin Rothd81debd2022-06-03 00:06:57 -060019${GREP_FILES} -n 'unsigned[[:space:]]' | \
Martin Rothf7906722016-04-06 16:32:37 -060020 grep "$INCLUDED_DIRS" | \
21 grep -v "$EXCLUDED_DIRS" | \
22 grep "$INCLUDED_FILES" | \
23 grep -v 'unsigned[[:space:]]*int\|unsigned[[:space:]]*long\|unsigned[[:space:]]*char\|unsigned[[:space:]]*short' | \
24 grep -v ':[[:space:]]*/\*\|:[[:space:]]*\*'