Repository navigation
feat(code-tidying): add comment_lint_exclude path globs to the comment lint - #18811
Conversation
…t lint The comment lint gains comment_lint_exclude, a team-file list of repository-relative path globs it skips, each skip named on stderr. * and ? stay within one path segment, ** spans segments, every other character is literal. It is read through comment-settings.sh --list, the path comment_lint_allow already takes, and the plugin ships no entries. This repository sets one entry, the directory of ci-workflows contract files vendored byte-identical to a pinned commit for the offline credential-legs test, whose comments are upstream's (owner decision Q156). Refs: #14293 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Lane-Activity: pr-refine/fix-docs
|
claude-security-review reviewed Security review: PR #18811, path globs for the comment lint (
|
|
claude-review reviewed Code review: no blocking findings (blocking only)This lane already reviewed an earlier head ( The PR adds What I checked (by reading the code; nothing was run)
Loosened checks The new entry in
Loosened checks would be marked: fail (plugin default; no wrapper-supplied layers); patterns: 0 Verifier dropped 0 of 0 candidates. |
Refs: #14293
Owner decision: Q156 option (1), a path-scoped comment-lint exclusion for the vendored credential-legs fixture (owner, in session 2026-11-24T15:15:05Z, verbatim: "Go with recommendations. I'm fine with lint exclusions, but those need to be heavily justified, and they should be far and few between."; recorded in the org's architecture repository, melodic-software/architecture#232, and quoted on #14293).
Summary
The comment lint gains
comment_lint_exclude, a team-file list of repository-relative path globs it skips. This repository sets one entry: the directory of ci-workflows contract files that PR #18710 vendors byte-identical to a pinned commit so the credential-legs test runs offline. It ships on its own because the pre-commit hook runs main's lint and CI restorescode-tidying.yamlfrom the merge base (scripts/check-comment-lint.sh:13-19), so the setting and its entry must be on main before #18710's fixture can land.Fix
plugins/code-tidying/git-hooks/comment-lint.sh: a file whose repository path matches an exclude glob is skipped before its text is read, withcode-tidying: comment lint skipped <path> (comment_lint_exclude: <glob>)on stderr. Globs follow git's:(glob)pathspec:*and?stay within one segment,**/matches zero or more segments, every other character is literal, and the glob must match the whole path.plugins/code-tidying/scripts/comment-settings.sh:comment_lint_excludejoinsLIST_KEYSand is read with--list, the pathcomment_lint_allowalready takes; team file only, so a personal override cannot exclude files.docs/conventions/code-tidying.yaml: one entry,.github/scripts/pr-unblock/fixtures/ci-workflows-394af27bda4bda2e02e0ef0691eacd120389108f/**, with its justification and the owner's words beside it..changes/code-tidying/: abump: minorfragment.Loosened checks
.github/scripts/pr-unblock/fixtures/ci-workflows-394af27bda4bda2e02e0ef0691eacd120389108f/. Why: those files are ci-workflows' select-model-credential contract, kept byte-identical to commit 394af27bda so the credential-legs suite runs without a network fetch (the fetch's HTTP 403s ejected merge-group runs, Find why the merge queue keeps ejecting groups #14293); their comments are upstream's, not ours, and editing them would break the byte identity the test's provenance check relies on. The lint has no other path-scoped way to skip them:comment_lint_allowmatches comment text in every file, and a generated marker would change the vendored bytes. The owner approved this exclusion (Q156) with the condition that exclusions be heavily justified and rare; this is the only entry.Verification
bash plugins/code-tidying/git-hooks/comment-lint.test.sh: 68 passed, 0 failed. Six new cases: an excluded file is skipped with the notice and a sibling outside the glob is still judged;*and?do not cross/;**/matches zero segments and.is literal; unset and empty settings judge every file; a personal override's list is not read.bash plugins/code-tidying/scripts/comment-settings.test.sh: all checks pass, including the team-file-only read of the exclude list.scripts/check-comment-lint.test.sh15 ok;scripts/check-affected-comment-lint.test.sh7 passed;lefthook-remote.test.sh24 passed.scripts/check-convention-yaml.sh --check: 21 files validate.sync-config-cascade-semantics.py --check: up to date.check-changelog-fragments.sh --check: all fragments valid.scripts/selection-audit.sh trace --strictoncomment-lint.test.sh: no gap.Remaining
Related
🤖 Generated with Claude Code