Skip to content

A comment opening on a tool's name stays exempt from the prose rules though it continues as prose #2805

Closed

Description

@ptr727

NOT_PROSE in .github/actions/prose-gate/prose_lint.py now anchors each tool name at the comment body's start, which closes the mid-sentence half of #1659. A body that opens on a tool's name and then continues as ordinary prose is still exempt from comment-wrap, comment-case and comment-added, the same as before that change.

Constructed cases, each drawing no finding from any of the three rules:

# eslint cannot see this file. it is generated.
# prettier rewrites this table. Keep it on one line.
# Copyright headers are required here. See NOTICE.

What was tried on the branch fixing #1659, and why it was dropped:

  • A guard refusing the exemption where the body closes as a sentence, the guard is_tool_directive applies to TOOL_DIRECTIVE, reported real directives carrying their tool's own reason separator: // eslint-disable-next-line no-console -- Logging is intended here. and # ruff: noqa: E501 - the URLs cannot wrap. each drew comment-case and comment-added, and comment-case advises capitalizing the name, which turns the suppression off.
  • Scoping that guard to the text before a trailing # reason fixed the shellcheck form the tree uses but exempted any prose followed by a #, a C# mention included.
  • A license header such as # Copyright 2024 Example Corp. ends in a full stop as often as not, so no sentence test can apply to Copyright or SPDX.

A fix therefore has to know each tool's reason separator, or narrow each name to its directive spelling (eslint-, prettier-ignore, shellcheck disable= and so on). The is_tool_directive docstring records that encoding two tools' grammars there got four forms wrong in one commit, so measure every directive form the fleet's languages use before choosing either.

Activity

  1. added
    bug
    gate
    pre-existing
    on Oct 11, 2026
  2. ptr727 commented on Oct 23, 2026

    @ptr727
    OwnerAuthor

    Closed under the maintainer's decision (ptr727, 2026-10-23) on #3391: the backlog keeps real bugs with a stated failure, features the maintainer wants, and open decisions. A finding the review loop filed on code or text a change did not touch, a refactor or consolidation chore, a tracker, a wording item, or a guard shape no session has produced is closed rather than worked. Reopen with the input and the wrong result if this issue states one.

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

    buggatepre-existing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions