Two efficiency findings from a code-review pass: - The separated (--config X) and joined (--config=X) argument branches duplicated ~20 lines of absolutize-if-relative path logic. Extracted into abs_config_value(), used by both branches; the redundant --config=/* special case falls out since the helper already passes absolute paths through unchanged. - The common single-file path spawned python3 twice per file (once for abspath resolution, once for flatten()). flatten() now optionally takes a tmpdir arg and does both in one process. The per-file loop under a directory argument is unchanged — that path wasn't flagged. agent-audit's copy is canonical; skill-audit's copy was regenerated via scripts/sync-vale-styles.sh, not hand-edited, to guarantee byte parity. No hardening (bash 3.2 compat, surrogateescape, symlink guards) touched. Verified: tests/test-vale-wrap.sh 39/39, check-vale-style-sync.sh clean, full suite 12/12.
22 KiB
Executable File
22 KiB
Executable File