Martin Roth | 0ad5fbd | 2020-12-24 12:06:38 -0700 | [diff] [blame] | 1 | #!/usr/bin/env sh |
Martin Roth | f790672 | 2016-04-06 16:32:37 -0600 | [diff] [blame] | 2 | # |
Patrick Georgi | 7333a11 | 2020-05-08 20:48:04 +0200 | [diff] [blame] | 3 | # SPDX-License-Identifier: GPL-2.0-only |
| 4 | |
Martin Roth | f790672 | 2016-04-06 16:32:37 -0600 | [diff] [blame] | 5 | # DESCR: Check that variables have fully qualified types |
| 6 | |
Martin Roth | d81debd | 2022-06-03 00:06:57 -0600 | [diff] [blame] | 7 | LINTDIR="$( |
| 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 Roth | f790672 | 2016-04-06 16:32:37 -0600 | [diff] [blame] | 14 | |
| 15 | INCLUDED_DIRS='^src/\|^util/\|payloads/libpayload\|payloads/coreinfo' |
Elyes HAOUAS | 8297fa1 | 2020-02-22 10:37:49 +0100 | [diff] [blame] | 16 | EXCLUDED_DIRS='^src/vendorcode\|cbfstool/lzma\|cbfstool/lz4' |
Martin Roth | f790672 | 2016-04-06 16:32:37 -0600 | [diff] [blame] | 17 | INCLUDED_FILES='\.[ch]:' |
| 18 | |
Martin Roth | d81debd | 2022-06-03 00:06:57 -0600 | [diff] [blame] | 19 | ${GREP_FILES} -n 'unsigned[[:space:]]' | \ |
Martin Roth | f790672 | 2016-04-06 16:32:37 -0600 | [diff] [blame] | 20 | 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:]]*\*' |