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
Add glob matching #8
Conversation
- Add --include option. - Add pattern matching in filter_allows. - Add patterns in Config. - Defaults patterns accepts "Cargo.toml", "Cargo.lock", "src/**/*.rs", "tests/**/*.rs" and "build.rs". - Ignore hidden files (starting with a dot) by default.
Strip project dir prefix from modified files instead of concatenating project dir and glob patterns.
Remove usage of the nightly feature (issue number unknown) which caused this error: ``` 154 | fn filter_allows(project_dir: &Path, patterns: &[Pattern], mut path: &Path) -> bool { | ----- ----- | | | these two types are declared with different lifetimes... ... 162 | path = p; | ^ ...but data from `project_dir` flows into `path` here% ```
src/config.rs
Outdated
} | ||
|
||
impl<'a> ConfigBuilder<'a> { | ||
pub fn new() -> Self { | ||
let defaults_pattenrs = vec![ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a little typo in pattenrs
src/lib.rs
Outdated
.short("i") | ||
.long("include") | ||
.takes_value(true) | ||
.help("Comma separated list of include pattern")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add in addition to the predefined default patterns
@Hugal31 Thank you for your PR. I am ready to merge this after addressing few very minor notes. |
Done! Thank you for the review! |
@Hugal31 Thank you! Sorry for the delay. |
Tracking issue: #7
Cargo.toml
Cargo.lock
src/**/*.rs
tests/**/*.rs
build.rs
--include
option to add custom patterns.