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