Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/actions/prose-gate/prose_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -1568,7 +1568,7 @@ def resume_at(carry: Carried, line: str) -> tuple[Carried, int | None]:
# A tool's name is anchored at the body's start, since a comment naming one mid-sentence is prose.
NOT_PROSE = re.compile(
r"^(?:!|\s*[-=#*/<>]+\s*$|ruff:|mypy:|(?i:flake8)[:=]|v\d+(?:\.\d+)*$"
r"|(?:(?i:noqa)|type:\s*ignore|pylint|shellcheck|markdownlint|omit from toc|prettier|eslint"
r"|(?:(?i:noqa|nopep8)|type:\s*ignore|pylint|shellcheck|markdownlint|omit from toc|prettier|eslint"
r"|SPDX|Copyright)\b|(?i:c?spell|spell-?checker):)"
)

Expand Down Expand Up @@ -1671,7 +1671,7 @@ def resume_at(carry: Carried, line: str) -> tuple[Carried, int | None]:
# So a name here is exempt from that one rule, and a name in `NOT_PROSE` from all three.
TOOL_DIRECTIVE = re.compile(
r"^(?:syntax=|escape=|fmt:\s*(?:on|off|skip)\b|pragma:|nosec\b|checkov:|hadolint\b"
r"|renovate:|yaml-language-server:|-\*-\s*coding[:=]|pyright:|isort:|(?i:nopep8)\b"
r"|renovate:|yaml-language-server:|-\*-\s*coding[:=]|pyright:|isort:"
r"|codespell:|doctest:)"
)

Expand Down
2 changes: 2 additions & 0 deletions tests/test_prose_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -1592,6 +1592,8 @@ def test_a_directive_is_read_in_any_letter_case_its_tool_reads(self) -> None:
("tool.py", "# NoQA\n"),
("tool.py", "# NOPEP8\n"),
("tool.py", "# NoPep8: E501\n"),
("tool.py", "# NOPEP8: E501. Another sentence follows.\n"),
("tool.py", "# nopep8\n"),
("app.ts", "// cspell:ignore vendorid\n"),
("app.ts", "// CSPELL: ignore vendorid\n"),
("app.ts", "// spell-checker: disable\n"),
Expand Down
Loading