File: shellcheck.sh

package info (click to toggle)
glib2.0 2.86.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 66,456 kB
  • sloc: ansic: 544,658; python: 9,702; sh: 1,612; xml: 1,482; perl: 1,222; cpp: 535; makefile: 321; javascript: 11
file content (23 lines) | stat: -rwxr-xr-x 613 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bash
# Copyright 2020 Frederic Martinsons
# Copyright 2024 Collabora Ltd.
# SPDX-License-Identifier: LGPL-2.1-or-later

set -eu

if [ -z "${G_TEST_SRCDIR-}" ]; then
    me="$(readlink -f "$0")"
    G_TEST_SRCDIR="${me%/*}"
fi

export TEST_NAME=shellcheck
export TEST_REQUIRES_TOOLS="git shellcheck"

run_lint () {
    # Ignoring third-party directories that we don't want to parse
    # shellcheck disable=SC2046
    shellcheck $(git ls-files '*.sh' 'gio/completion/' | grep -Ev "glib/libcharset|glib/dirent|gitignore")
}

# shellcheck source=tests/lint-common.sh
. "$G_TEST_SRCDIR/lint-common.sh"