You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have two suggestions for improvements in terms of handling the input files arguments:
Allow to pass in links from stdin, e.g. follow the standard-ish Unix convention of specifying - as input file, instructing the program to read in from STDIN instead. E.g. this should work fine:
# - means read from stdin instead from file
$ echo"https://google.com"| lychee -
Issue some kind of warning or error for non-existing files. Perhaps erroring out instead of issuing a warning can be an optional flag. This should help the user experience in the face of typos and other mishaps.
Agree with both. 👍
With regards to 2, why would you make warnings the default? My thinking is that warnings could be overseen (especially in CI) and files might not get checked as a consequence, leading to subtle testing holes. A hard error would avoid that and a flag like --skip-missing would turn the error into a warning. Thoughts?
I guess I'm thinking about backwards compatibility. But, since there's no official release (yet?) we are not really shackled by breaking backwards compatibility and making it error on missing files. I like the --skip-missing flag idea!
Activity
mre commentedon Oct 27, 2020
Agree with both. 👍
With regards to 2, why would you make warnings the default? My thinking is that warnings could be overseen (especially in CI) and files might not get checked as a consequence, leading to subtle testing holes. A hard error would avoid that and a flag like
--skip-missingwould turn the error into a warning. Thoughts?pawroman commentedon Oct 28, 2020
I guess I'm thinking about backwards compatibility. But, since there's no official release (yet?) we are not really shackled by breaking backwards compatibility and making it error on missing files. I like the
--skip-missingflag idea!mre commentedon Oct 28, 2020
Nice, then let's go with explicit hard errors. Before 1.0 everything goes.
pawroman commentedon Nov 16, 2020
Started working on this now; expect a PR soon-ish 😉
Add support for reading from stdin and make input handling more robust (