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

Use ignore for better control over globbing #25

Merged
merged 5 commits into from
Jan 29, 2021
Merged

Use ignore for better control over globbing #25

merged 5 commits into from
Jan 29, 2021

Conversation

basile-henry
Copy link
Contributor

resolves #13: Includes and excludes
resolves #24: Follows .gitgnore directives

resolves #13: Includes and excludes
resolves #24: Follows .gitgnore directives
@basile-henry basile-henry added the enhancement New feature or request label Jan 28, 2021
@basile-henry basile-henry self-assigned this Jan 28, 2021
src/formatters/tool.rs Outdated Show resolved Hide resolved
@Rizary
Copy link
Contributor

Rizary commented Jan 28, 2021

Great! I have tried with the following config:

includes = [ "haskell/", "haskell-frontend/"]
excludes = [ "haskell/" ] # blacklisted folder/files.

Even though it looks impossible, we should put some warning or error about the same value in both. We can make it excludes by default and put some warning on it.

@Rizary Rizary requested a review from zimbatm January 28, 2021 11:08
Copy link
Member

@zimbatm zimbatm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. There are some subtle corner-cases that I don't know how to handle, like what to do if a file is being explicitly passed. But we'll figure those out through actual usage.

@Rizary
Copy link
Contributor

Rizary commented Jan 29, 2021

Noted. I'll make my concern in separate PR and we'll go from there.

@Rizary Rizary merged commit 46dd46f into master Jan 29, 2021
@basile-henry basile-henry deleted the basile/ignore branch January 29, 2021 10:07
brianmcgee added a commit that referenced this pull request May 13, 2024
Move all config related code into a config package.

Signed-off-by: Brian McGee <brian@bmcgee.ie>

Reviewed-on: https://git.numtide.com/numtide/treefmt/pulls/25
Reviewed-by: Jonas Chevalier <zimbatm@noreply.git.numtide.com>
Co-authored-by: Brian McGee <brian@bmcgee.ie>
Co-committed-by: Brian McGee <brian@bmcgee.ie>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Follow .gitignore directives Adding includes and excludes features
3 participants