Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Add check for broken links #312

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add check for broken links #312

wants to merge 2 commits into from

Conversation

jablko
Copy link
Contributor

@jablko jablko commented Sep 25, 2020

The list of dead links was harvested with the following:

git grep -h '^// \(Project\|Definitions\): ' 'types/*/index.d.ts' |
  sed '
    s/\r$//
    s%^// \(Project\|Definitions\): %%
    s/, /\n/g
  ' |
  sort --unique |
  while read -r url; do
    curl --fail --insecure --silent --url "$url" > /dev/null || echo "$url"
  done > broken-links.txt

A similar check was previously removed from dts-critic because it wasn't that useful. This one differs in that it only applies to unresolvable links. It's caught some typos, as well as link rot.

Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

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

  1. I'm not sure I understand the intent. Is the broken-link error limited to the known list in broken-links.txt? Why not just fix those links then?
  2. The did-you-mean-homepage error seems to behave the same as the former dts-critic error. Is that true? Won't it still break continually as random packages update their homepages on npm?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants