-
Notifications
You must be signed in to change notification settings - Fork 120
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
Allow specifying multiple files on the command line #78
Comments
I'd like to see this feature implemented too for the very same reason. Thanks for this cool package. |
I would like this option as well. We run all tests on our CI server. We need a single pass/fail report for all checked files. As the tool only checks a single file at a time, we need to write our own shell script which loops through all files, keeps track of any failures, and then reports a pass/fail. It would be nice if the tool could do all of that itself. Then we could simply call the tool once and be done. |
This part is interesting and preventing calls to many similar urls is definitely a feature to add. Maybe in a separated ticket |
For the multiple files passed in a sorted manner, there's multiple things here: Testing multiple filesThis is what can be done with the
Then use:
and you will have
See https://stackoverflow.com/questions/2711001/how-to-apply-shell-command-to-each-line-of-a-command-output for subtleties on using |
Thanks for the explanation. But for prec-commit hooks, we need a single command that takes options and a list of files. The approach with xargs does not work out of the box with that. Also, I am not sure what exactly prevents you from just looping over the input files internally. This seems like not a great deal to implement and there is a high demand from the community. |
We were using an |
Created a separate ticket. Lower priority than this one though (IMHO) #111 |
While the |
Sent a draft PR here #178. |
This is similar to #40 but slightly different. I'd like to be able to pass multiple file names on the command line and check each one in sequence, e.g.
markdown-link-check file1.md file2.md
The motivation for this is trying to add a hook with pre-commit (https://pre-commit.com/); this splits the full list of files to check into smaller lists, but currently only one file from each list is checked.This would also potentially allow some optimizations; for example if a URL appears in two markdown files, you would only need to make the request once and cache the status for subsequent checks.
The text was updated successfully, but these errors were encountered: