Skip to content

Conversation

@bagder
Copy link
Member

@bagder bagder commented Dec 11, 2025

It finds debug outputs in source code otherwise.

Output the whitelist "warnings" to stderr to better allow us to count URLs with ./mdlinkcheck --dry-run | wc -l.

It finds debug outputs in source code otherwise.

Output the whitelist "warnings" to stderr to better allow us to count
URLs with `./mdlinkcheck | wc -l`.
@bagder bagder added the script label Dec 11, 2025
@bagder bagder marked this pull request as ready for review December 11, 2025 16:18
@bagder bagder requested a review from Copilot December 11, 2025 16:18
@bagder
Copy link
Member Author

bagder commented Dec 11, 2025

augment review

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 1 suggestion posted.

Comment augment review to trigger a new review at any time.

return;

# is it a markdown extension?
my $md = ($f =~ /\.md$/);
Copy link

Choose a reason for hiding this comment

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

Consider making the extension check case-insensitive (e.g., /\.md$/i) so files like README.MD are also scanned. This avoids missing markdown links in repos that use uppercase extensions.

🤖 Was this useful? React with 👍 or 👎

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the mdlinkcheck script to prevent false positives when scanning for broken links. The script now restricts markdown-style link detection ([text](url)) to only markdown files, avoiding the detection of debug output patterns in source code. Additionally, whitelist warnings are redirected to stderr to enable clean URL counting via ./mdlinkcheck | wc -l.

  • Adds markdown file detection to only search for markdown-style links in .md files
  • Redirects whitelist warnings to stderr for cleaner stdout output

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bagder bagder closed this in 2e3687c Dec 11, 2025
@bagder bagder deleted the bagder/mdlink-markdown branch December 11, 2025 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant