Feature #2509
closeddoc: make rake linkchecker task and describe in readme
Updated by Brett Smith over 10 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.)
Updated by Brett Smith over 10 years ago
Updated version looks great to me. I say merge it. Thanks again.