feat: implement MD034 no-bare-urls rule with comprehensive validation#50
Merged
Conversation
Add complete implementation of MD034 rule that detects bare URLs and email addresses that should be properly formatted with angle brackets or markdown links. Key Features: - Uses linkify crate for robust URL/email detection - Handles complex edge cases: mailto: schemes, URLs in link text, code spans - Perfect parity with original markdownlint (27/27 violations match) - Comprehensive test suite with 16 unit tests including edge cases - International domain and email support - Single-pass O(n) performance optimized algorithm Implementation Details: - Processes paragraph nodes to find bare URLs within markdown text - Excludes properly formatted contexts: <url>, [text](url), `code`, HTML attributes - Enhanced markdown link detection for both link text and targets - Sophisticated pattern matching for scheme prefixes (mailto:, ftp:, etc.) Files Added: - crates/quickmark_linter/src/rules/md034.rs (504 lines) - docs/rules/md034.md (rule documentation) - test-samples/test_md034_*.md (comprehensive test cases) Dependencies Added: - linkify 0.10 for accurate URL/email detection Progress: 8/48 rules implemented (16.7%) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add complete implementation of MD034 rule that detects bare URLs and email addresses that should be properly formatted with angle brackets or markdown links.
Key Features:
Implementation Details:
code, HTML attributesFiles Added:
Dependencies Added:
Progress: 8/48 rules implemented (16.7%)
🤖 Generated with Claude Code