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

Ignore option still reads rustfmt.toml from excluded folders #4726

Open
JakkuSakura opened this issue Feb 27, 2021 · 1 comment
Open

Ignore option still reads rustfmt.toml from excluded folders #4726

JakkuSakura opened this issue Feb 27, 2021 · 1 comment
Labels
only-with-option requires a non-default option value to reproduce p-low

Comments

@JakkuSakura
Copy link

Describe the bug
Ignore option still reads rustfmt.toml from excluded folders

To Reproduce

tree         
├── Cargo.lock
├── Cargo.toml
├── patched
│   └── webpki
│       ├── Cargo.toml
│       ├── rustfmt.toml  < 'merge_imports=true'
│       └── src
│           └── webpki.rs
└── rustfmt.toml  < 'ignore = ["patched",]'


cargo fmt                                  
Warning: the `merge_imports` option is deprecated. Use `imports_granularity=Crate` instead

example.zip

Expected behavior
no output

Meta

  • rustfmt version: rustfmt 1.4.36-nightly (7de6968 2021-02-07)
  • From where did you install rustfmt?: rustup component add rustfmt
  • How do you run rustfmt: cargo fmt
@JakkuSakura JakkuSakura added the bug Panic, non-idempotency, invalid code, etc. label Feb 27, 2021
@calebcartwright calebcartwright added only-with-option requires a non-default option value to reproduce p-low and removed bug Panic, non-idempotency, invalid code, etc. labels Feb 27, 2021
@calebcartwright
Copy link
Member

Thanks for reporting. I don't recall off hand if we load/parse/interpret the config files as part of recursively loading them, but I suppose it would make sense to avoid if we can.

ignore is really about whether or not to apply formatting changes though at runtime though, everything still gets parsed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
only-with-option requires a non-default option value to reproduce p-low
Projects
None yet
Development

No branches or pull requests

2 participants