Commit | Line | Data |
---|---|---|
86a9f7d3 MJ |
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 | ||
b939afe5 | 9 | shellcheck=${SHELLCHECK:-shellcheck} |
86a9f7d3 MJ |
10 | retcode=0 |
11 | ||
12 | while read -r script_file; do | |
13 | echo "Running ShellCheck on \`$script_file\`" | |
14 | pushd "${script_file%/*}" >/dev/null | |
b939afe5 | 15 | "$shellcheck" -x "${script_file##*/}" || retcode=$? |
86a9f7d3 MJ |
16 | popd >/dev/null |
17 | done <<< "$(find . -type f -name '*.sh' \ | |
18 | ! -path './.git/*' \ | |
66a1e089 | 19 | ! -path ./config/ltmain.sh \ |
86a9f7d3 MJ |
20 | ! -path ./tests/utils/tap-driver.sh \ |
21 | ! -path ./tests/utils/tap/tap.sh)" | |
22 | ||
23 | exit $retcode |