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

An algorithm to generate glob patterns that match given entries, but not other given glob patterns #2

Open
Byron opened this issue Mar 15, 2020 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@Byron
Copy link
Contributor

Byron commented Mar 15, 2020

Quite similar to what grex does for regex, we seek to do in this function:
https://github.com/crates-io/criner/blob/5b0c4795c73f8a5d9c772f27d2d33abe9ec5f66f/criner/src/engine/report/waste/report/result.rs#L220-L229

If it works, it will turn this…
https://github.com/crates-io/criner/blob/2ea15d562d794bea5df9664bacf9995d4b14025e/criner/src/engine/report/waste/report_test/from_extracted_crate.rs#L134-L135

…into this (note the negation)…

…
include_added: ["!pregenerated/tmp/*"]

There are alternatives to a negation pattern, which would be 'just the right™️' include patterns.
It might also be possible to adjust the code leading up to it so that 'being smart' is not needed by simply 'being less stupid' beforehand.

@Byron Byron added the help wanted Extra attention is needed label Mar 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant