aboutsummaryrefslogtreecommitdiff
path: root/scripts/lint.sh
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-16 07:33:46 -0500
committerCraig Jennings <c@cjennings.net>2026-05-16 07:33:46 -0500
commit3fb4c80eb00d6e89b594eb4e5ce570f20fe2e63b (patch)
treed69b199692e5af14fa0459eb94de997eaa3bf56d /scripts/lint.sh
parent684891d57166953f4314b060afc78403a1d6976d (diff)
downloadrulesets-3fb4c80eb00d6e89b594eb4e5ce570f20fe2e63b.tar.gz
rulesets-3fb4c80eb00d6e89b594eb4e5ce570f20fe2e63b.zip
feat(lint-org): recognize cj-comment blocks and suppress false-positive warnings
org-lint emits three warnings for every `#+begin_src cj: comment ... #+end_src` annotation block: suspicious-language-in-src-block (the language `cj:` isn't a known Babel slug), wrong-header-argument (the trailing `comment` looks like a header arg without a colon), and empty-header-argument (that same `comment` has no value). All three are false positives. The cj-comment block is a Craig-specific annotation marker, not Babel src-block syntax. I added a helper `lo--cj-comment-block-opener-p` that pattern-matches the opener line, then a short-circuit branch at the top of `lo--handle-item` that silently drops any of the three checkers when they fire on a cj-comment opener. No fix is counted, no judgment is emitted, and the warnings disappear. Two new tests cover the change. The normal case is a solo cj-comment block, which should produce zero judgments and zero fixes with all three flagged checkers absent from the issue list. The boundary case is a cj-comment block alongside a real `#+begin_src markdown` block. The markdown warning still surfaces, which scopes the suppression to cj openers only — no leak into other src blocks. Test count goes from 22 to 24, all green. I smoke-tested against rulesets/todo.org: judgment count drops from 7 to 1. Six cj-comment false positives at lines 16 and 1291 are gone, and the unrelated misplaced-heading at 2139 still surfaces correctly.
Diffstat (limited to 'scripts/lint.sh')
0 files changed, 0 insertions, 0 deletions