Tests: Add meta shellcheck test
[lttng-tools.git] / tests / meta / shellcheck-tests
CommitLineData
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.
9files=(
10 meta/shellcheck-tests
11 run.sh
12)
13
14TESTDIR=$(dirname "$0")/..
15
16# shellcheck source=../utils/tap/tap.sh
17source "$TESTDIR/utils/tap/tap.sh"
18
19function shellcheck_ok() {
20 shellcheck --external-sources "$1"
21 ok $? "Checking $1"
22}
23
24plan_tests "${#files[@]}"
25
26for f in "${files[@]}";
27do
28 shellcheck_ok "$TESTDIR/$f"
29done
This page took 0.023746 seconds and 4 git commands to generate.