lint: Tell ShellCheck to look for sourced files at relative paths.

This uses the new -P option of ShellCheck 0.7.0.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
Anders Kaseorg 2019-12-16 13:16:15 -08:00 committed by Tim Abbott
parent 02169c48cf
commit ab211c7acf
2 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ fi
# Drop any open connections to any old database. Hackishly call using
# `source`, because postgres user may not be able to read this directory
# if unpacked by root.
# shellcheck source=/dev/null
# shellcheck source=terminate-psql-sessions
source "$(dirname "$0")/terminate-psql-sessions" postgres zulip zulip_base
(

View File

@ -77,7 +77,7 @@ def run():
linter_config.external_linter('openapi', ['node', 'tools/check-openapi'], ['yaml'],
description="Validates our OpenAPI/Swagger API documentation"
"(zerver/openapi/zulip.yaml) ")
linter_config.external_linter('shellcheck', ['shellcheck', '-x'], ['sh'],
linter_config.external_linter('shellcheck', ['shellcheck', '-x', '-P', 'SCRIPTDIR'], ['sh'],
description="Standard shell script linter.")
command = ['tools/run-mypy', '--quiet']
if args.force: