Skip to content

The prose gate reads an uppercase Markdown suffix as Markdown in one place and not in the others #2804

Closed

Description

@ptr727

check_file in .github/actions/prose-gate/prose_lint.py compares path.suffix == ".md" case-sensitively at each of its Markdown-only branches, and comment_wrap_findings does the same for its unpunctuated-HTML-comment exemption. syntax_for lowercases the suffix, so a file named with an uppercase Markdown suffix has its comments extracted as Markdown but then misses every Markdown-only branch.

Constructed case: a file NOTES.MD holding <!-- group header --> draws comment-case, where the same content in NOTES.md is exempt as a structural marker. The sentence-split, sentence-length, dead-path and quote-stripping branches are skipped for it entirely.

The .py comparison in comment_wrap_findings was made case-insensitive on the branch fixing #1659, which is where this was found by a local review pass. The .md comparisons were left alone there since they sit outside that issue. The fix is presumably one lowercased suffix read once per call and used at every comparison, with a case pinning an uppercase .MD against each branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggateA rule with no mechanical check, or a check that misses a shapepre-existingReview finding classed pre-existing per local-strict-review Disposing of Findings

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions