| 1 | #!/usr/bin/env sh |
| 2 | # |
| 3 | # SPDX-License-Identifier: GPL-2.0-only |
| 4 | |
| 5 | # DESCR: Check that variables have fully qualified types |
| 6 | |
| 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" |
| 14 | |
| 15 | INCLUDED_DIRS='^src/\|^util/\|payloads/libpayload\|payloads/coreinfo' |
| 16 | EXCLUDED_DIRS='^src/vendorcode\|cbfstool/lzma\|cbfstool/lz4' |
| 17 | INCLUDED_FILES='\.[ch]:' |
| 18 | |
| 19 | ${GREP_FILES} -n 'unsigned[[:space:]]' | \ |
| 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:]]*\*' |