Commit | Line | Data |
---|---|---|
c1410397 OD |
1 | #!/usr/bin/env bash |
2 | # SPDX-License-Identifier: GPL-2.0-only | |
3 | # | |
4 | # Copyright (c) 2023 Olivier Dion <odion@efficios.com> | |
5 | ||
6 | # Augment this list incrementally when a shell script passes shellcheck. | |
7 | # | |
8 | # All file must be relative to the test directory. | |
9 | files=( | |
10 | meta/shellcheck-tests | |
11 | run.sh | |
12 | ) | |
13 | ||
14 | TESTDIR=$(dirname "$0")/.. | |
15 | ||
16 | # shellcheck source=../utils/tap/tap.sh | |
17 | source "$TESTDIR/utils/tap/tap.sh" | |
18 | ||
19 | function shellcheck_ok() { | |
20 | shellcheck --external-sources "$1" | |
21 | ok $? "Checking $1" | |
22 | } | |
23 | ||
24 | plan_tests "${#files[@]}" | |
25 | ||
26 | for f in "${files[@]}"; | |
27 | do | |
28 | shellcheck_ok "$TESTDIR/$f" | |
29 | done |