| 1 | #!/bin/bash |
| 2 | # |
| 3 | # SPDX-License-Identifier: GPL-2.0-only |
| 4 | # |
| 5 | # SPDX-FileCopyrightText: 2023 Michael Jeanson <mjeanson@efficios.com> |
| 6 | |
| 7 | set -eu |
| 8 | |
| 9 | retcode=0 |
| 10 | |
| 11 | while read -r script_file; do |
| 12 | echo "Running ShellCheck on \`$script_file\`" |
| 13 | pushd "${script_file%/*}" >/dev/null |
| 14 | shellcheck -x "${script_file##*/}" || retcode=$? |
| 15 | popd >/dev/null |
| 16 | done <<< "$(find . -type f -name '*.sh' \ |
| 17 | ! -path './.git/*' \ |
| 18 | ! -path ./config/ltmain.sh \ |
| 19 | ! -path ./tests/utils/tap-driver.sh \ |
| 20 | ! -path ./tests/utils/tap/tap.sh)" |
| 21 | |
| 22 | exit $retcode |