Ignore option still reads rustfmt.toml from excluded folders
Open
Nobody has claimed this yet.
only-with-option
P-low
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 24
Description
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
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Unpack example.zip and run cargo fmt in the example tree, then compare the root rustfmt.toml with the excluded patched/webpki/rustfmt.toml. Trace how rustfmt discovers configuration in excluded folders; done means cargo fmt produces no warning about the excluded folder's deprecated merge_imports option.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100