mdn / mdn/browser-compat-data

Test for broken links

Open
#2,128 5 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement idle linter
Dominant language
JSON
Stars
5.8k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
186

Description

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).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the BCD data fields named in the issue, especially mdn_urls and notes, and compare the linked fish-shell proof of concept with the requirements from #1990, #1998, and #1703. Done means adding an automatic, portable URL check that handles intentionally broken links without reporting them incorrectly.

Written by the indexing model from the issue text.

Assessment

Tech stack
fish, json
Domain
testing-qa, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.