Commit graph hyperhive/scripts/check-comment-blocks.sh
Author SHA1 Message Date
damocles
94a172cba3 docs: stop claiming tracker-tag/comment-block lint are non-required 2026-07-23 00:10:59 +02:00
atlas
34e12e97a3 address argus: catch nix /* */ block comments too
mode_of mapped .nix to hash-mode (# only); nix also supports /* */ block
comments, so a long one would slip past. Split .nix into its own 'nix' mode
that handles BOTH # line comments and /* */ blocks. .sh stays hash (no block
comments in sh). Verified: tree still 6 offenders (no nix block offenders), and
a 33-line nix /* */ block is now caught.
2026-06-29 18:35:55 +02:00
atlas
bd86a3c1dd feat(#2081): CI lint for comment blocks over 30 lines
Flags any contiguous comment block longer than 30 lines — the threshold
above which a why/impl-notes block should move to docs/ rather than live
in-code (the #2077 rubric, made self-enforcing).

- scripts/check-comment-blocks.sh: git+awk, mirrors check-issue-refs.sh's
  capture-output shape (robust to xargs batching). Handles # line comments
  (nix/sh), // line comments (rs/js/ts), and /* */ (rs/js/ts/css) + <!-- -->
  (html) block comments. Blank separates line-comment blocks; a blank inside
  a /* */ / <!-- --> block stays part of it. lint:allow-long-comment escape
  hatch. Threshold is a tunable constant.
- ci.yml: own 'comment-block lint' job, kept OUT of required checks while the
  tree settles (red signal, not a merge gate), like the tracker-tag lint.

Current tree has 6 blocks > 30 (all in the frontend + hive-c0re-core #2077
slices, none in nix/infra): matrix-accounts.js, permissions.js,
stream-worker.js, terminal.js, hivectl.rs:1036, assets.rs. Non-required, so
non-blocking — they're the remaining #2077 targets for those area owners.
2026-06-29 18:35:55 +02:00