Skip to content

Commit ab211c7

Browse files
andersktimabbott
authored andcommitted
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 <[email protected]>
1 parent 02169c4 commit ab211c7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

scripts/setup/postgres-init-db

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

4343
(

tools/lint

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def run():
7777
linter_config.external_linter('openapi', ['node', 'tools/check-openapi'], ['yaml'],
7878
description="Validates our OpenAPI/Swagger API documentation"
7979
"(zerver/openapi/zulip.yaml) ")
80-
linter_config.external_linter('shellcheck', ['shellcheck', '-x'], ['sh'],
80+
linter_config.external_linter('shellcheck', ['shellcheck', '-x', '-P', 'SCRIPTDIR'], ['sh'],
8181
description="Standard shell script linter.")
8282
command = ['tools/run-mypy', '--quiet']
8383
if args.force:

0 commit comments

Comments
 (0)