-
-
Notifications
You must be signed in to change notification settings - Fork 141
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
Respect gitignore #1500
Respect gitignore #1500
Conversation
@mre I've got three questions:
|
Very nice!
Yes, same. Sounds very reasonable to me. Thanks!
Absolutely. I'm all for it. Please go forward and change it if you like. Maybe we could use the
Yes, that sounds sensible to me. 👍 |
@mre Thanks for the answers. The PR is now ready for review. Just one last thing; clippy complains about too many booleans in the
|
Awesome. I don't like that lint too much. Maybe we can ignore it for now. |
Coincidentally, it's the most ignored lint: rust-lang/rust-clippy#5418 |
Yeah I also felt like this is very picky and currently there are 292 results which is quite a lot in comparison to other lints. Began extracting the three bools but it didn't feel like a benefit, only like more code. So I also prefer disabling the lint here. |
I don't know why the For consistency, I'd propose to rename the options:
Here's the other options so far: ❯❯❯ lychee --help | rg 'exclude|include'
--include <INCLUDE>
URLs to check (supports regex). Has preference over all excludes
--exclude <EXCLUDE>
--exclude-file <EXCLUDE_FILE>
Deprecated; use `--exclude-path` instead
--exclude-path <EXCLUDE_PATH>
-E, --exclude-all-private
Equivalent to `--exclude-private --exclude-link-local --exclude-loopback`
--exclude-private
--exclude-link-local
--exclude-loopback
--exclude-mail
Exclude all mail addresses from checking (deprecated; excluded by default)
--include-mail
--include-fragments
--include-verbatim I'm assuming you probably modeled the existing flags after ripgrep, which is a fine choice. Looking through the list of existing options above, I realize that they all have to do with links, not inputs (with the exception of |
@mre Yes exactly, I used the same names as ripgrep does as I find them very good.
|
Ah, that makes sense. Thanks for the clarification and the awesome PR. |
This adds support for overwriting extensions: ``` lychee . --extensions md,html,txt,json,yaml ``` The above would only check these extensions. This was enabled by moving to `ignore` (#1500 by @thomas-zahner). Fixes #410
Closes #1331
With this PR lychee skips files that are ignored (by git or .ignore) and hidden by default. This behaviour can be disabled with the
--no-ignore
and--hidden
flags respectively. This is done by replacing jwalk with ignore.Files are considered ignored as defined by
standard_filters
with the exception ofhidden
which is handled with the separate flag or config option.