Closed
Conversation
- Add _is_localhost_url method to detect localhost patterns - Skip localhost, 127.x.x.x, [::1], and 0.0.0.0 URLs - Handle IPv6 addresses in brackets correctly - Tested with comprehensive localhost URL patterns Co-authored-by: galaxyeye <1701451+galaxyeye@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Optimize check-links scripts to ignore localhost connections
Skip localhost URLs in link checker
Feb 13, 2026
Qodana for JVM1660 new problems were found
☁️ View the detailed Qodana report Detected 10 dependenciesThird-party software listThis page lists the third-party software dependencies used in project
Contact Qodana teamContact us at qodana-support@jetbrains.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.
Link checker was attempting network connections to localhost URLs in documentation examples, causing unnecessary timeouts and false positives.
Changes
_is_localhost_url()to detect localhost patterns before network calls_should_skip_url()to filter localhost URLs during link extractionLocalhost patterns handled
localhost(any port)127.x.x.x(entire loopback range)[::1](IPv6 localhost with bracket parsing)0.0.0.0Implementation
URLs are filtered before entering the checking pipeline, eliminating connection attempts entirely.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
www.amazon.com/usr/bin/python3 python3 bin/quality/check-links.py docs/rest-api-examples.md(dns block)www.google.com/usr/bin/python3 python3 bin/quality/check-links.py /tmp/link-checker-test/test-localhost.md --root /tmp/link-checker-test(dns block)/usr/bin/python3 python3 /home/REDACTED/work/Browser4/Browser4/bin/quality/check-links.py /tmp/link-checker-test/test-localhost.md --root /tmp/link-checker-test(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.