diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-25 15:39:05 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-25 15:39:05 -0500 |
| commit | e1b5bc7628899445cb317e2f27aed9586c303ae6 (patch) | |
| tree | f1bff1cae6e16252232445af3465bb7fc536b4f6 /languages | |
| parent | 886399328b5f263faf158bf3acf4303c2f4466ff (diff) | |
| download | rulesets-e1b5bc7628899445cb317e2f27aed9586c303ae6.tar.gz rulesets-e1b5bc7628899445cb317e2f27aed9586c303ae6.zip | |
fix(elisp): add themes/ to the validate-el.sh load path
The PostToolUse hook byte-compiles each saved .el with -L for the project root, modules/, and tests/, but not themes/. A theme file that requires a sibling under themes/ then fails byte-compile with "Cannot open load file", a false VALIDATION FAILED even though the file loads fine at runtime. I added -L themes/ to both the byte-compile and test-runner blocks.
Adding a load-path entry for a directory that doesn't exist is harmless to Emacs, so it stays unconditional, matching how modules/ and tests/ are already added without an existence guard.
Diffstat (limited to 'languages')
| -rwxr-xr-x | languages/elisp/claude/hooks/validate-el.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/languages/elisp/claude/hooks/validate-el.sh b/languages/elisp/claude/hooks/validate-el.sh index 803badf..782f04c 100755 --- a/languages/elisp/claude/hooks/validate-el.sh +++ b/languages/elisp/claude/hooks/validate-el.sh @@ -51,6 +51,7 @@ case "$f" in -L "$PROJECT_ROOT" \ -L "$PROJECT_ROOT/modules" \ -L "$PROJECT_ROOT/tests" \ + -L "$PROJECT_ROOT/themes" \ --eval '(package-initialize)' \ "$f" \ --eval '(check-parens)' \ @@ -92,6 +93,7 @@ if [ "$count" -ge 1 ] && [ "$count" -le "$MAX_AUTO_TEST_FILES" ]; then -L "$PROJECT_ROOT" \ -L "$PROJECT_ROOT/modules" \ -L "$PROJECT_ROOT/tests" \ + -L "$PROJECT_ROOT/themes" \ --eval '(package-initialize)' \ -l ert "${load_args[@]}" \ --eval "(ert-run-tests-batch-and-exit '(not (tag :slow)))" 2>&1)"; then |
