File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11default :
22 @ just --list
33
4- build :
5- eask recompile
6-
4+ # Run the ERT test suite.
75test :
8- eask run script test
6+ @ scripts/ run-tests.sh
7+
8+ # Lint + test — the combined pre-commit entrypoint.
9+ check : fmt lint test
10+
11+ fmt : elisp-autofmt shfmt
12+
13+ elisp-autofmt :
14+ @ scripts/ quiet.sh eask format elisp-autofmt
15+
16+ shfmt :
17+ @ shfmt -i 4 -l -w scripts/ quiet.sh scripts/ run-tests.sh
18+
19+ # Run the full lint suite (silent on success; failing stage writes
20+ # .lint-output.txt and exits non-zero, short-circuiting the rest).
21+ lint : byte-compile elisp-lint org-lint shellcheck zizmor
22+ @ echo " lint: OK"
23+
24+ # --- Individual lint stages -------------------------------------------------
25+ # Each recipe is a thin wrapper around scripts/quiet.sh; silent on
26+ # success, writes failing-stage output to .lint-output.txt on failure.
27+
28+ byte-compile :
29+ @ scripts/ quiet.sh eask recompile
30+
31+ elisp-lint :
32+ @ rm -f ./ *.elc
33+ @ scripts/ quiet.sh eask lint elisp-lint; rc=$?; rm -f ./ *.elc; exit $rc
34+
35+ org-lint :
36+ @ scripts/ quiet.sh eask run script org-lint
37+
38+ shellcheck :
39+ @ scripts/ quiet.sh shellcheck scripts/ quiet.sh scripts/ run-tests.sh
40+
41+ zizmor :
42+ @ scripts/ quiet.sh zizmor .github/ workflows/ claude-code-review.yml .github/ workflows/ claude.yml .github/ workflows/ elisp-test.yml
943
10- lint :
11- ./ check.sh
44+ # --- Passthrough ------------------------------------------------------------
1245
1346act * args :
1447 act {{ args}}
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 2424 ...
2525 } : {
2626 pre-commit . settings . hooks = {
27- lint = {
27+ # Single combined hook so pre-commit only emits one status line
28+ # (`check.....Passed`) on success. The recipe runs lint first,
29+ # then tests, and aborts on the first failure.
30+ check = {
2831 enable = true ;
29- name = "lint" ;
30- entry = "just lint" ;
31- pass_filenames = false ;
32- } ;
33- test = {
34- enable = true ;
35- name = "test" ;
36- entry = "just test" ;
32+ name = "check" ;
33+ entry = "just check" ;
3734 pass_filenames = false ;
3835 } ;
3936 } ;
5754 # GitHub Actions checks
5855 # checkov
5956 zizmor
60-
61- # Markdown / text
62- mdl
63- prettier
64-
65- # JSON / JS
66- biome
67- nodejs
6857 ] ;
6958 shellHook = ''
7059 ${ config . pre-commit . installationScript }
Original file line number Diff line number Diff line change 1414
1515(setq mcp-server-lib-ert-server-id " org-mcp" )
1616
17+ ; ; Emit only ERT's concise batch output (one-line summary on success,
18+ ; ; failing tests' backtraces + condition blocks on failure).
19+ (setq ert-quiet t )
20+
1721; ;; Test Data Constants
1822
1923; ; Initial content strings for various test scenarios
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ # quiet.sh — run a lint stage silently; always capture its output to
3+ # .lint-output.txt, and on failure point the user at the file.
4+ #
5+ # Usage: scripts/quiet.sh CMD [ARGS...]
6+ # Success: exits 0 with no output.
7+ # Failure: prints "lint failed: output at .lint-output.txt" and
8+ # propagates the command's exit code.
9+
10+ set -u
11+
12+ if [ " $# " -lt 1 ]; then
13+ printf ' usage: %s CMD [ARGS...]\n' " $0 " >&2
14+ exit 2
15+ fi
16+
17+ OUTFILE=" .lint-output.txt"
18+
19+ " $@ " > " $OUTFILE " 2>&1
20+ rc=$?
21+ if [ " $rc " -ne 0 ]; then
22+ printf ' lint failed: output at %s\n' " $OUTFILE "
23+ exit " $rc "
24+ fi
You can’t perform that action at this time.
0 commit comments