coderefinery / manuals

Diverse operation manuals for CodeRefinery workshops and lesson design.
https://coderefinery.github.io/manuals/
Creative Commons Attribution 4.0 International
9 stars 12 forks source link

Suggestion to have internal link check #194

Open samumantha opened 2 years ago

samumantha commented 2 years ago

As part of the workflow.

Ie check that all internal links that are mentioned in manuals actually (still) have the page that is linked to.

bast commented 2 years ago

double-upvote

rkdarst commented 2 years ago

Sphinx always reports on broken internal links (if they are made as internal links and not general web links). This action is a "problem matcher" that somehow parses the output and produces error messages for anything broken: uses: @.***

But, yeah, it doesn't fail on warnings. Sometimes I have seen sphinx warn too much, though that isn't the case here. SPHINXOPTS=-W would make sphinx fail on errors, and do this (and more). Can be set in Makefile or .github/workflows/sphinx.yml

rkdarst commented 2 years ago

In the linked PR, it seemed that warnings in the action were enough. Is that the case?

bast commented 2 years ago

In another project we let CI fail on all warnings and it helped us to clean up lots of problems. But later people started complaining because some external links started rotting and they had to do something about it. We ended up on failing on all internal links but warning on external link breakage. If that sounds useful, I could have a look how we solved that.