Check filter-rules-by-config before invoking the tokenizer in
lint-file. When all CST rules are disabled (e.g. --disable
comment-semicolons), the expensive tokenize+parse-cst pass is
skipped entirely.
On the Guix tree (1336 files), this saves ~2s on surface-only
runs (15.6s → 13.7s). The savings are more pronounced on
projects with fewer monster files.
Bug 1: Config auto-discovery — load-config now walks CWD and parent
directories for .gulie.sexp when no --config is given, matching the
documented behavior. Added find-config helper.
Bug 2: Compile-error messages garbled — the catch handler now properly
destructures Guile exception args (subr fmt fmt-args . _) and uses
apply+format instead of raw display, producing readable messages like
"no code for module (guix licenses)" instead of
"#f no code for module ~S ((guix licenses)) #f".
Bug 3: --init template unreadable — generate-template now uses
pretty-print instead of write, producing properly indented output.
Bug 4: CLI options silently ignored — --pass, --disable, --rule, and
--severity are now wired up in main and threaded into config as %pass,
augmented disable list, enable list, and %min-severity respectively.
Bug 5: enable/disable config keys never consulted — added
filter-rules-by-config, used in run-line-rules and run-cst-rules.
Bug 6: blank-lines rule spammed one diagnostic per excess line —
changed trigger to fire once per group at the boundary.
Bug 7: read-file-to-string slow — replaced line-by-line accumulation
with get-string-all.
Bug 8: No way to skip semantic pass — lint-file now respects %pass
config key (surface/semantic/all) and %min-severity for filtering.