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.
Hi @smoelius! I've researched on my own about how to filter out the false positives we are encountering(#1536) consisting of:
$
I managed to make significant progress, especially with filtering out these two.
The first notable change from the lint is the switch to the
fancy-regex
crate, which allow more flexibility by using look-around assertions in regular expressions. Here's a detailed breakdown of the key improvements:fancy-regex
URL_REGEX
patternhttps?://\S+
to detect web URLsPATH_REGEX
to support:\$
)http://
,https://
)www.
)$
)These changes significantly reduce false positives while maintaining strong detection of actual broken path references. The fancy-regex crate enables complex pattern matching that would panic with the standard regex crate, particularly the negative lookbehind needed for accurate URL detection within comments.
The test suite has also been updated to verify these new cases, including:
$DIR/path
syntaxLooking forward to your feedback!