Skip to content

Commit f051db3

Browse files
Fix shellcheck source resolution for shared script library
1 parent 40d6c8c commit f051db3

6 files changed

Lines changed: 6 additions & 7 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
set -euo pipefail
3232
mapfile -d '' files < <(find . -type f \( -name "*.sh" -o -path "./.githooks/pre-push" \) -print0)
3333
for f in "${files[@]}"; do
34-
shellcheck "$f"
34+
shellcheck -x --source-path=SCRIPTDIR "$f"
3535
done
3636
3737
- name: Lint JavaScript syntax

scripts/doctor.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -euo pipefail
33

44
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
5-
# shellcheck source=./lib.sh
5+
# shellcheck source=scripts/lib.sh
66
source "${ROOT_DIR}/scripts/lib.sh"
77

88
REQUIRED_COMMANDS=(
@@ -31,4 +31,3 @@ for cmd in "${REQUIRED_COMMANDS[@]}"; do
3131
echo " ${cmd}: installed"
3232
fi
3333
done
34-

scripts/ensure_plg_changes_entry.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -euo pipefail
33

44
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
55
PLG_FILE="${ROOT_DIR}/folderview.plus.plg"
6-
# shellcheck source=./lib.sh
6+
# shellcheck source=scripts/lib.sh
77
source "${ROOT_DIR}/scripts/lib.sh"
88

99
if [[ ! -f "${PLG_FILE}" ]]; then

scripts/install_smoke.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -euo pipefail
44
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
55
PLG_FILE="${ROOT_DIR}/folderview.plus.plg"
66
ARCHIVE_DIR="${FVPLUS_ARCHIVE_DIR:-${ROOT_DIR}/archive}"
7-
# shellcheck source=./lib.sh
7+
# shellcheck source=scripts/lib.sh
88
source "${ROOT_DIR}/scripts/lib.sh"
99

1010
if [[ ! -f "${PLG_FILE}" ]]; then

scripts/release_prepare.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
set -euo pipefail
33

44
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
5-
# shellcheck source=./lib.sh
5+
# shellcheck source=scripts/lib.sh
66
source "${ROOT_DIR}/scripts/lib.sh"
77
cd "${ROOT_DIR}"
88

tests/versioning-guard.test.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ test('release workflows keep checksum assets and metadata changes', () => {
185185
test('CI includes shellcheck linting for repository shell scripts', () => {
186186
assert.match(ciWorkflow, /Install shellcheck/);
187187
assert.match(ciWorkflow, /Lint shell scripts/);
188-
assert.match(ciWorkflow, /shellcheck "\$f"/);
188+
assert.match(ciWorkflow, /shellcheck -x --source-path=SCRIPTDIR "\$f"/);
189189
});
190190

191191
test('shared script library and doctor preflight exist with required helpers', () => {

0 commit comments

Comments
 (0)