-
Notifications
You must be signed in to change notification settings - Fork 2
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
Replace markdown-link-checker
with Linkspector
#85
Conversation
4baac7d
to
b708298
Compare
73ea76f
to
2604c8c
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.
I'm not convinced it's working. I would still expect it to fail on the websites that have a CAPTCHA test and it's not failing.
Can you put in a link that we know for sure is broken?
README.md
Outdated
@@ -11,9 +11,10 @@ This repository contains blogs by the [central RSE team](https://www.imperial.ac | |||
- Install the dependencies `poetry install` | |||
- Install the pre-commit hooks `poetry run pre-commit install` | |||
|
|||
[here is a madeup link](https://github.com/ImperialCollegeLondon/madeup_link) |
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.
🚫 [linkspector] reported by reviewdog 🐶
Cannot reach https://github.com/ImperialCollegeLondon/madeup_link. Status: 404
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.
@AdrianDAlessandro I added a broken link just to double-check it's working ^^
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.
Wonderful! Seems good to me! I guess you can revert that commit now
10bdaf9
to
2604c8c
Compare
98e6267
to
2604c8c
Compare
.github/workflows/check-links.yml
Outdated
use-verbose-mode: "yes" | ||
github_token: ${{ secrets.github_token }} | ||
reporter: github-pr-review | ||
fail_on_error: true |
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.
I wondered whether fail_on_error
meant that as soon as it found a broken link, it stopped reporting (thus not finding further broken links), so looked it up and apparently this option is deprecated (link)
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.
Good spot!
Are you going to implement this elsewhere / in the python template? |
I was thinking of changing my projects to use it. That's a good shout about the Python template -- I guess we're going to be using that for the foreseeable future. |
I was looking at adding a link checker to another project and thought it would be worth checking out linkspector as an alternative to the existing
markdown-link-checker
action we're using now. The project's by the same author and on themarkdown-link-checker
repo it suggests using linkspector instead.I thought the blog would be a good place to try it out because it contains a bunch of links.
Linkspector a couple of advantages over
markdown-link-checker
:I'm currently using the
ubuntu-22.04
runner cf.ubuntu-latest
as there's an open bug affecting the latter. Looks like there's a fix in the works though.