Files
AdGuardHome/scripts/make/sh-lint.sh
T

39 lines
828 B
Bash

#!/bin/sh
# This comment is used to simplify checking local copies of the script. Bump
# this number every time a significant change is made to this script.
#
# AdGuard-Project-Version: 6
# Don't use -f, because we use globs in this script.
set -e -o 'pipefail' -u
verbose="${VERBOSE:-0}"
readonly verbose
if [ "$verbose" -gt '0' ]; then
set -x
fi
# Source the common helpers, including not_found and run_linter.
. ./scripts/make/helper.sh
go="${GO:-go}"
readonly go
run_linter "$go" tool shfmt --binary-next-line -d -p -s \
./scripts/hooks/* \
./scripts/install.sh \
./scripts/make/*.sh \
./scripts/snap/*.sh \
./snap/local/*.sh \
;
shellcheck -e 'SC2250,SC2310,SC3040' -f 'gcc' -o 'all' -x -- \
./scripts/hooks/* \
./scripts/install.sh \
./scripts/make/*.sh \
./scripts/snap/*.sh \
./snap/local/*.sh \
;