-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Hook request: Check for 404 links in README #83
Comments
Great idea. What’s really awesome about pre-commit is that it supports many languages and it handles all dependencies for supported languages. So my approach would be
We can find instructions here on how to add a hook and potentially also check the existing node repo https://github.com/pre-commit/mirrors-eslint to get a feel for it. Are you interested in contributing? Unfortunately, multiple files can't be passed to the hook at the same time, but there is an open issue for this: tcort/markdown-link-check#78 |
Try this adding this to your - repo: https://github.com/lorenzwalthert/precommit-markdown-link-check
rev: v0.0.0.9002 # Use the sha / tag you want to point at
hooks:
- id: markdown-link-check See https://github.com/lorenzwalthert/precommit-markdown-link-check. Note that it can only check md or rmd READMEs as of now because of tcort/markdown-link-check#78. |
Should we close this as resolved? I wonder if we should link the repo elsewhere. Or maybe wait and hope tcort/markdown-link-check#78 gets fixed soon? Because the general use case would be to apply this to all files, also .Rmd files and maybe even .R files. for link checking. |
Sorry, forgot to reply. Didn't I do that somewhere else? Worked for me and I like it a lot! I think you can def link it even if tcort/markdown-link-check#78 would be a nice addition. |
The new r-lib/urlchecker could be a great hook :) Takes a while though - maybe in combination with caching? |
https://github.com/tcort/markdown-link-check works now for multiple inputs and pre-commit support was added there, hence, I suggest that. My repo https://github.com/lorenzwalthert/precommit-markdown-link-check is archived and should not be used anymore. |
I just came across a few dead links in a README and was wondering if this could be catched via pre-commit hook :)
The text was updated successfully, but these errors were encountered: