Skip to content

Fix shared documentation lint edge cases - #24443

Merged
MikeMcQuaid merged 1 commit into
mainfrom
shared-docs-lint-fixes
Nov 2, 2026
Merged

MikeMcQuaid merged 1 commit into
mainfrom
shared-docs-lint-fixes

Conversation

@MikeMcQuaid

Copy link
Copy Markdown
Member
  • Reject bare URLs at the start of a line.
  • Skip empty Markdown directories without hiding Git failures.

  • Have you followed our Contributing guidelines?
  • Have you checked for other open Pull Requests for the same change?
  • Have you explained what your changes do? Performance claims (e.g. "this is faster") must include brew benchmark results.
  • Have you explained why you'd like these changes included, not just what they do?
  • For bug fixes, have you given step-by-step brew commands to reproduce the bug?
  • Have you written new tests (excluding integration tests)? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) locally?

  • I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6326d3ac-bacc-445b-b75d-1494e4d27bbd
Commits

Reviewing files that changed from the base of the PR and between c6075ba and 6f9bec9.

Files selected for processing: 1
  • docs/Rakefile

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.

Summary

Summary by CodeRabbit

  • Chores
    • Updated documentation checks to flag bare URLs at the start of a line or directly after any non-whitespace character.
    • The documentation lint task now skips subsequent checks when no Markdown files are tracked and reports an error if the tracked-file lookup fails.
    • General Markdown linting excludes the designated index and manpage files; their separate checks remain in place. Filenames are safely handled in the review-date check.

The documentation lint configuration now matches URLs at the start of a line. The lint task checks whether tracked Markdown files can be listed, filters files for general linting, and shell-escapes paths for the missing-frontmatter check.

Changes: Documentation lint

Layer / File(s) Summary
Lint task file detection
docs/Rakefile
The task requires Ruby’s English and shellwords libraries. It raises an error if listing tracked Markdown files fails and skips linting if the list is empty. It excludes Manpage.md, docs/index.md, and index.md from general linting. It shell-escapes paths for the missing-frontmatter check. The separate index.md lint remains.
HB034 URL matching
docs/.mdl_ruleset.rb
The HB034 pattern now matches HTTP and HTTPS URLs at the start of a line or after a non-whitespace character.
Merge Risk: Minimal · up to 6f9be

The lint task now fails on Git listing errors and avoids silently linting no files; the URL rule also covers URLs at the start of a line.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title clearly summarises the documentation lint fixes in the changeset, including edge cases in URL detection and Markdown directory handling.
Description check Passed The description directly explains the two documentation lint changes and relates to the changeset.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Comment thread docs/Rakefile Resolved
@MikeMcQuaid
MikeMcQuaid force-pushed the shared-docs-lint-fixes branch from 77c4943 to c6075ba Compare November 2, 2026 13:23

@coderabbitai coderabbitai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up Comments

Outside diff Detect bare URLs after punctuation.

8-8: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Detect bare URLs after punctuation.

The current regex lets See (https://example.test) pass the docs lint task. This violates the documented prohibition on bare URLs and narrows the MD034 behaviour that HB034 replaces.

Suggested fix
-    doc.matching_text_element_lines(%r{(?<!\S)https?://})
+    doc.matching_text_element_lines(%r{https?://})

Open the source location

Comment thread docs/Rakefile Resolved
- Reject bare URLs at the start of a line.
- Skip empty Markdown directories and report Git failures.
- Reuse the checked file list for every Markdown lint check.
@MikeMcQuaid
MikeMcQuaid force-pushed the shared-docs-lint-fixes branch from c6075ba to 6f9bec9 Compare November 2, 2026 13:58
@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit f6051a7 Nov 2, 2026
53 checks passed
@MikeMcQuaid
MikeMcQuaid deleted the shared-docs-lint-fixes branch November 2, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

⌂ 换网址