AMWA-TV / nmos-lint-scripts

Linting scripts for NMOS spec repos
Apache License 2.0
0 stars 1 forks source link

Add link checking #2

Open peterbrightwell opened 4 years ago

peterbrightwell commented 4 years ago

E.g. with https://github.com/remarkjs/remark-validate-links/ (see https://github.com/AMWA-TV/nmos-system/pull/13)

peterbrightwell commented 4 years ago

ac8355f538eaa2e88ac36eb51edf3bf92d8a4315 adds checking of local Markdown links (tested with nmos-template and nmos-system).

Next to try checking remote links with https://github.com/davidtheclark/remark-lint-no-dead-urls

peterbrightwell commented 4 years ago

Unfortunately remote link checking soon triggers an GitHub abuse mechanism* due to many links to other repos so another approach may be needed

*my IP (?) was locked out for about ten minutes. Posted this initially from GitHub app via 4G.

peterbrightwell commented 4 years ago

Because of the above (which I've seen before with my Chrome link checker) we may have to check remote links after rendering on github.io. That would be done on HTML files not Markdown.

peterbrightwell commented 4 years ago

In the meantime, https://github.com/stevenvachon/broken-link-checker is useful for an offline check using blc -ro https://amwa-tv.github.io/nmos

garethsb commented 2 years ago

@peterbrightwell The lint checking of local links is throwing up some false positives in nmos-parameter-registers... there are some links from the Capabilities register to e.g. Flow Attributes register which are written as e.g. ../flow-attributes/#transfer-characteristic. The checker doesn't like these, I guess because it doesn't explicitly include the file name README.md (or index.html as it ends up?). I wonder if we can educate the checker about default filename??

garethsb commented 1 year ago

Ah, I just raised this again as https://github.com/AMWA-TV/nmos-parameter-registers/issues/52, oops.