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
feat: markdownlint: Add a links checker and fix some links #758
base: master
Are you sure you want to change the base?
Conversation
Hi @purpleidea , [docs/on-the-web.md]:
✗ [404] https://www.youtube.com/watch?v=jB992Zb3nH0&html5=1 | Failed: Network error: Not Found
✗ [404] https://www.youtube.com/watch?v=MmpwOQAb_SE&html5=1 | Failed: Network error: Not Found
✗ [404] https://vimeo.com/191493409 | Failed: Network error: Not Found
✗ [ERR] https://roidelapluie.be/blog/2017/02/14/mgmt-augeas/ | Failed: Network error: error sending request for url (https://roidelapluie.be/blog/2017/02/14/mgmt-augeas/)
✗ [ERR] https://annex.debconf.org//debconf-share/debconf16/slides/15-next-generation-config-mgmt.pdf | Failed: Network error: error sending request for url (https://annex.debconf.org//debconf-share/debconf16/slides/15-next-generation-config-mgmt.pdf) |
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.
Awesome! One question, and also what do you think we need to do about the timeouts and other issues in the logs? I'll look at the broken links not included in your patch.
Also your commit message should be:
test: Add a links checker and fix some links
To pass...
test/test-markdownlint.sh
Outdated
STYLE=$($mktemp) | ||
# create a tmp file in current directory e.g. "./tmp.rMKAQ63Cm6" | ||
# so that mdl command can locate the file (must contain a '/' or end in '.rb') | ||
STYLE=$($mktemp -p .) |
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.
Why is this change needed?
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.
After updating mdl to 0.13.0 locally, the test passes as well in my dev env. This change is not necessary and has been removed from the patch.
I am just uploading some fixed links, and I will submit a patch to git master with the fixes. After that is done, in theory rebasing your patch should be enough. Thanks again! |
Should be ready for rebase. |
e4b3d99
to
6c290e8
Compare
Thanks for the hint! |
Awesome running tests now.
Sweet.
Yes, sorry about my lack of clarity. In the previous build test: https://github.com/purpleidea/mgmt/actions/runs/8958628695/job/24604796138#step:6:178 I see some network timeout issues. Is that a concern? Let's see what this run does. Here's a screenshot: It occured to me that GH actions might actually rate limit things. If so we might have to disable some stuff. We'll see. |
It seems it might be following a non-link but pretending it's a link. Is there a way to disable that? |
0444bf8
to
794dbdd
Compare
Sorry for the late reply.
Links can be excluded by add them into
If you mean output of the lychee command, I could change the format with the option |
794dbdd
to
ec29a26
Compare
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.
Patch looks good. One quick Q. But otherwise should we merge?
@@ -0,0 +1,3 @@ | |||
# list URLs that should be excluded for lychee link checher | |||
https://roidelapluie.be | |||
https://github.com/purpleidea/mgmt/commit |
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.
Why do we want to exclude this URL?
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.
Ignoring the first url because it does not work, like in a previous build test.
Ignoring the second url because of possible rate limiting e.g. in this build test.
But this is just a suggestion and the second link can be removed from .lycheeignore
.
Add a links checker using lychee into test-markdownlint.sh
Some links are fixed as well.
Fixes #440.
Main reason to choose lychee over muffet:
easy to use. lychee can deal with files, path wildcards and urls, while muffet expects urls as input.