-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test for broken links #2128
Comments
Two other scripts also exist to do this, although I think they only check the links in the
This should probably be a command that's separate from the There's also the problem of master failing because of changes on MDN when this project didn't change anything, which is less than ideal. |
At the very least, the linter should be a bit more clever about detecting MDN URLs (eg. if it finds something that matches the Right now, it only prints an error if it finds Another thing that might be a good idea to test is if the I’ll make a PR soon to test for the above rules. |
@ExE-Boss This is an old issue, though still an important one. Do you intend to follow up on this? |
I completely forgot about this, thanks for reminding me. |
Alright, so I have a PR that tests the HTTP response codes from every URL within BCD (and I do mean EVERY URL). However, I've found that it's slow...super slow, due to how many links there are. (The test took quite literally an hour to complete, which is partially due to a little redundancy I found; see #5243 for that). It looks like a total of 365 files currently have issues -- this is probably a project for us to tackle. |
From the discussion on #1990, it'd be nice to have automatic checks on URLs that appear in the BCD data, both in
mdn_urls
and in notes.I have a little bit of a proof of concept in the form of a script I use as a local pre-commit hook. Unfortunately, it's not at all clever, uses some non-standard tools, and it's a fish shell script, so it's not exactly portable. There's probably a right way to do this but I'm not sure what that would look like.
Additionally, previously related issues #1998 and #1703 imply that it may be desirable to have some broken links (e.g., MDN pages that should exist, but don't).
The text was updated successfully, but these errors were encountered: