aboutsummaryrefslogtreecommitdiff
path: root/.claude/hooks/validate-el.sh
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-25 13:16:30 -0500
committerCraig Jennings <c@cjennings.net>2026-05-25 13:16:30 -0500
commite0f6b54f41384e8bfdc33810b370ca6eaca9298f (patch)
tree282f8c97194662c7d737ec495d38ee9f5a5a9fed /.claude/hooks/validate-el.sh
parentbdbfaa5aec491c89087506508829e9b7a64917bc (diff)
downloaddotemacs-e0f6b54f41384e8bfdc33810b370ca6eaca9298f.tar.gz
dotemacs-e0f6b54f41384e8bfdc33810b370ca6eaca9298f.zip
chore: sync bundled claude rules and git hooks
Routine sync of the .claude/rules and git hooks distributed with the language bundle. Adds the cross-project, emacs, interaction, todo-format, triggers, and working-files rules; refreshes the elisp and elisp-testing rules, the elisp validation hook, and the pre-commit hook.
Diffstat (limited to '.claude/hooks/validate-el.sh')
-rwxr-xr-x.claude/hooks/validate-el.sh8
1 files changed, 2 insertions, 6 deletions
diff --git a/.claude/hooks/validate-el.sh b/.claude/hooks/validate-el.sh
index 334578ae..803badf8 100755
--- a/.claude/hooks/validate-el.sh
+++ b/.claude/hooks/validate-el.sh
@@ -41,16 +41,13 @@ MAX_AUTO_TEST_FILES=20 # skip if more matches than this (large test suites)
case "$f" in
*/init.el|*/early-init.el)
# Byte-compile here would load the full package graph. Parens only.
- if ! output="$(emacs --batch --no-site-file --no-site-lisp \
- --eval '(setq load-prefer-newer t)' \
- "$f" \
+ if ! output="$(emacs --batch --no-site-file --no-site-lisp "$f" \
--eval '(check-parens)' 2>&1)"; then
fail_json "PAREN CHECK FAILED" "$f" "$output"
fi
;;
*.el)
if ! output="$(emacs --batch --no-site-file --no-site-lisp \
- --eval '(setq load-prefer-newer t)' \
-L "$PROJECT_ROOT" \
-L "$PROJECT_ROOT/modules" \
-L "$PROJECT_ROOT/tests" \
@@ -92,13 +89,12 @@ if [ "$count" -ge 1 ] && [ "$count" -le "$MAX_AUTO_TEST_FILES" ]; then
load_args=()
for t in "${tests[@]}"; do load_args+=("-l" "$t"); done
if ! output="$(emacs --batch --no-site-file --no-site-lisp \
- --eval '(setq load-prefer-newer t)' \
-L "$PROJECT_ROOT" \
-L "$PROJECT_ROOT/modules" \
-L "$PROJECT_ROOT/tests" \
--eval '(package-initialize)' \
-l ert "${load_args[@]}" \
- --eval "(ert-run-tests-batch-and-exit '(not (or (tag :slow) (tag :perf))))" 2>&1)"; then
+ --eval "(ert-run-tests-batch-and-exit '(not (tag :slow)))" 2>&1)"; then
fail_json "TESTS FAILED ($count test file(s))" "$f" "$output"
fi
fi