Skip to content
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

Globs ignore exclude_path #1405

Open
Tracked by #1
Wumpf opened this issue Apr 16, 2024 · 1 comment
Open
Tracked by #1

Globs ignore exclude_path #1405

Wumpf opened this issue Apr 16, 2024 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Wumpf
Copy link

Wumpf commented Apr 16, 2024

I wanted lychee to check rust files, so I run lychee **/*.rs, confused why it takes so long to scan for links, I ran lychee **/*.rs --dump-inputs which showed that paths excluded via exclude_path options (e.g. target) did not influence the glob.

This is quite inconvenient since what I'm actually after is adding extensions to be checked. At the very least this should be documented better.

@mre
Copy link
Member

mre commented Apr 16, 2024

I think it should actually should work, though.
At least that's the idea of this part:

if self.is_excluded_path(&path) {
continue;

At this point, I don't know why it doesn't work.
One note, though: you're using your operating system's glob handling. Glob expansion happens in your shell.
To use the Rust-based one, you need to quote the glob.

lychee '**/*.rs' --dump-inputs

so

lychee --exclude-path './target/' '**/*.rs' --dump-inputs

However, this gives me the same incorrect results as you described.
If you find the correct incantation, we should certainly document that.
Otherwise, I consider this a bug and would love to have someone investigate that.
Not sure if you have the time, but I'd certainly appreciate your help.

As a side note, glob filtering is not ideal right now. Would love to move to globset, which would allow us to provide multiple globs and so on. That shouldn't be a blocker for better exclude handling for globs with the current implementation, though.

@mre mre added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Apr 16, 2024
Wumpf added a commit to rerun-io/rerun that referenced this issue Apr 16, 2024
### What

Code files are now included in link checking.

* Fixes #5925

Some issues encountered:
* globs don't respect exclude_files which makes working with this
locally harder lycheeverse/lychee#1405
* can't specify extensions / correct files aren't picked up
automatically lycheeverse/lychee#410

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested the web demo (if applicable):
* Using examples from latest `main` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/5986?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[rerun.io/viewer](https://rerun.io/viewer/pr/5986?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG
* [x] If applicable, add a new check to the [release
checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)!

- [PR Build Summary](https://build.rerun.io/pr/5986)
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)

To run all checks from `main`, comment on the PR with `@rerun-bot
full-check`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants