Feature #2509

doc: make rake linkchecker task and describe in readme

Added by Ward Vandewege over 7 years ago. Updated over 7 years ago.

Assigned To:
Start date:
Due date:
% Done:


Estimated time:
(Total: 0.50 h)
Story points:


Task #2512: update run-tests.sh on ci to use rake linkcheckerResolvedWard Vandewege

Task #2510: Review 2509-rake-linkcheckerResolvedWard Vandewege

Task #2511: add rake linkchecker + update docsResolvedWard Vandewege


#1 Updated by Ward Vandewege over 7 years ago

  • Assigned To set to Ward Vandewege

#2 Updated by Brett Smith over 7 years ago

Thanks for adding this. I love being able to do more tests locally—it means fewer bad builds on Jenkins. :)

The new h2 in README is numbered 2, duplicating the h2 after it. IMO we should just remove all the numbering.

As a general point of code hygiene, I think it'd be good to pass a block to Dir.chdir that does the linkchecker call. That avoids snagging future developers with the different working directory.

--ignore-url takes a regular expression. Could we better anchor the patterns that are meant to catch schemes, like ^mailto: and ^javascript:? That could help avoid ignoring links we shouldn't—I think javascript especially could generate false negatives. For external hosts, we could probably match against \bhostname\.tld(/|$).

Is there any particular rhyme or reason to which external hosts are ignored? If it's supposed to be "all of them," I think it will save us maintenance time in the long run if we figure out a way to dynamically generate this list. I don't think it has to be perfect, just something that's good enough to avoid a requirement to add hostnames to the list when we add links. (I'm a little surprised and annoyed that linkchecker doesn't have a switch like --dont-visit-other-hosts, but them's the breaks.)

#3 Updated by Brett Smith over 7 years ago

Updated version looks great to me. I say merge it. Thanks again.

#4 Updated by Ward Vandewege over 7 years ago

  • Status changed from New to Resolved

Also available in: Atom PDF