Skip to content

Better handle input files arguments #26

Closed
Closed

Description

@pawroman

I have two suggestions for improvements in terms of handling the input files arguments:

  1. 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 -
  1. 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.

Activity

  1. mre commented on Oct 27, 2020

    @mre
    Member

    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?

  2. pawroman commented on Oct 28, 2020

    @pawroman
    MemberAuthor

    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!

  3. mre commented on Oct 28, 2020

    @mre
    Member

    Nice, then let's go with explicit hard errors. Before 1.0 everything goes.

  4. added
    enhancement
    good first issue
    help wanted
    on Nov 9, 2020
  5. pawroman commented on Nov 16, 2020

    @pawroman
    MemberAuthor

    Started working on this now; expect a PR soon-ish 😉

  6. added a commit that references this issue on Dec 3, 2020
    fedc387
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementgood first issuehelp wanted

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions