-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check links on CI #902
base: main
Are you sure you want to change the base?
Check links on CI #902
Conversation
7e39b77
to
89329ea
Compare
Good catch! These are literate Haskell files that aren't rendered and uploaded to the website, which we actually might want to do. I'm creating a separate issue for this EDIT: #903 |
Drive-by comment: some broken links detected here are (also) fixed in #884 |
@gromakovsky as discussed in #4 (comment), would it be possible to demote the output to a warning? |
AFAIK there is no way to report "warning" status for a check, I see a feature request for it, but it's unresolved: https://github.com/orgs/community/discussions/11592 Two other options have been proposed in the issue comment:
I'm new to this repo, so please let me know how you would like to proceed:
|
89329ea
to
f85bc43
Compare
Right, after rebasing onto latest |
First of all, thanks for your PR. I think having an automated link checker is a good thing to have, and
With
With
|
f85bc43
to
3de3464
Compare
For what it's worth, this review request was generated automatically by GitHub due to a rebase. I didn't mean to request another review just yet—not until I respond to the questions from the previous review. |
Yes. We wanted to include a few other improvements before cutting a release, and now
Two reasons:
The old version follows those permanent redirects instead of reporting them. Our experience of using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation above.
The PR looks good, however we require commits to be signed. You will need to force-push the branch with signed commits.
Problem: Markdown files contain a plenty of links which tend to get outdated occasionally. It's hard to notice when a certain link (local or global) becomes broken. Solution: in the past, the `xrefcheck` tool was used to find broken links: * IntersectMBO#3 * IntersectMBO#454 See https://github.com/serokell/xrefcheck This PR automates `xrefcheck` running by adding it as a new GitHub Actions job. It uses [xrefcheck-action](https://github.com/serokell/xrefcheck-action) under the hood. Resolves IntersectMBO#4
Problem: several links in Markdown files are broken. Solution: 1. Links in References.md, index.md and TechnicalReports.md are invalid in the sense of Markdown and this repo, but they work on the website, so they are explicitly ignored. 2. Glossary.md contains many links to anchors in the same file. These anchors work differently in Markdown and Docusarus as can be seen here: https://ouroboros-consensus.cardano.intersectmbo.org/docs/for-developers/Glossary/ Ideally, they should be fixed to work on the resulting website, in which case all of them would be broken in the sense of Markdown. Fixing them for Docusaurus is out of scope of this commit, but we force xrefcheck to ignore all links in that file in preparation for that fix. 3. There is also an anchor link in VersioningSchemeDecision.md, but this file is not used in the resulting website, so we fix it according to Markdown rules.
3de3464
to
a22feb3
Compare
Description
Markdown files contain a plenty of links which tend to get outdated occasionally. It's hard to notice when a certain link (local or global) becomes broken.
In the past, the
xrefcheck
tool was used to find broken links:This PR automates
xrefcheck
running by adding it as a new GitHub Action job. It uses xrefcheck-action under the hood.Resolves #4
In the second commit I tried to fix/ignore broken links detected by
xrefcheck
using my best judgement. AFAIUdocs/website
contains sources for https://ouroboros-consensus.cardano.intersectmbo.org/, so I used that site to check some links.References.md
,index.md
andTechnicalReports.md
don't work on GitHub because they are invalid in the sense of Markdown, but they work fine on the website, so I didn't touch them and added a comment to makexrefcheck
ignore them.Glossary.md
contains many links to anchors in the same file. These anchors work differently in Markdown and Docusarus as can be seen here. Ideally, they should be fixed to work on the resulting website, in which case all of them would be broken in the sense of Markdown. Fixing them for Docusaurus is out of scope of this PR, but since they will probably become broken in the sense of Markdown, I've instructedxrefcheck
to ignore all links in that file.VersioningSchemeDecision.md
, but this file is not used in the resulting website, so I've fixed it according to Markdown rules.There are also some global/absolute links that return 404 and I couldn't find how to fix them.