tools: Add shellcheck.sh
[babeltrace.git] / tools / shellcheck.sh
CommitLineData
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
7set -eu
8
9retcode=0
10
11while 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
16done <<< "$(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
22exit $retcode
This page took 0.026557 seconds and 4 git commands to generate.