-
-
Notifications
You must be signed in to change notification settings - Fork 142
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
lycheeignore ergonomics #418
Comments
Something like: --exclude-file for regex/glob pattern This won't break existing workflows. (But this is a breaking change in API so version number should increment.) |
|
I don't think exclude vs ignore clears anything up. To me both can be understood as either directive: "ignore/exclude this file" -- or as "load this ignore/exclude-file" How about:
Just deleting the feature ofc also works, upgrade path could be:
|
Arguments are treated as URL patterns, so no. At least not yet. We could add support for Apart from that I like the suggestions. |
To make some progress on this, here is a proposal:
|
I would first get a lot of feedback before changing this, because I want to avoid future confusion. Will probably try to get more eyeballs on this. |
I'd like to move forward with the proposal as this issue keeps biting people. If anyone has any comments, please post them here or react with 👍 or 👎 . If there are no further reactions I would go ahead and create a PR with the changes. |
I think the proposal in #418 (comment) is reasonable! Though I feel like it is giving the user some unnecessary complexity to remember when it is
Since in this case Would it be too much to use the above proposal AND rename |
in my opinion the most important use case of lychee-bin is in CI. And the preferred way of configuration is via a .toml file. Directly passing arguments via CLI is secondary in my opinion. My only recommendation is to keep it similar to the interface of ripgrep (as I mentioned earlier) and probably also fd-find. |
There are a lot of A lot of bigger pipelines pass arguments via lychee-action's Maybe the separation between That leaves us with
|
That sounds reasonable to me :-) maybe deprecate it for now, and once it's removed if a bunch of people start complaining that they want to call it something other than For what it's worth, I likely assumed that |
The changes got merged to
|
In refined-github/refined-github#5115, @fregante ran into an interesting issue.
The lychee call used was as follows:
and this caused the following error:
It took me a while to figure out what was going on.
The
--exclude-file
, was not used as a newline-separated list of regular expressions for filtering out links.Instead in this case it was meant as a way to exclude a single file from getting checked.
However lychee interpreted that file as one... huge... regex. 🙈💥
Given that there currently is no way to exclude individual files, I wonder if we should reinterpret the
--exclude-file
setting as a way to literally exclude files. It would probably avoid that sort of confusion in the future.Our ignore file is called
.lycheeignore
so if anything the naming of the param should match that.git
doesn't have a way to specify an ignore file from the cli at all, so perhaps we just make it a convention that the file is called.lycheeignore
and simply have no way to add more.Any objections? Otherwise I'd cut out a PR for that.
The text was updated successfully, but these errors were encountered: