commit 5d7d021521c00f760421c53ce1eed8f1e42f2ac8 parent 9383a9870222ffe325294376bfc0c4b4b88460d4 Author: Vincent Forest <vincent.forest@meso-star.com> Date: Mon, 25 Aug 2025 12:20:03 +0200 Correction of hook linting They were linted from their directory when they should be linted from the section to which they belong. Diffstat:
| M | Makefile | | | 12 | ++++++++++-- |
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile @@ -69,7 +69,15 @@ $(HTML): generate_header.sh .sh.shlint: @echo "Linting $<" - @cd -- "$$(dirname "$<")"; \ - shellcheck -o all -x "$$(basename "$<")" + @# Scripts are executed in their local directory, with the + @# exception of hooks, which are executed relative to the section + @# directory. + @i="$<"; \ + if echo "$${i#*/}" | grep -qe '^hooks/'; then \ + cd -- "$${i%%/*}"; \ + else \ + cd -- "$$(dirname "$<")"; \ + fi; \ + shellcheck -o all -x "$${i#*/}" lint__: $(LINT)