rust-lang / rust-lang/rustfmt

Misses some files but catching others in big workspace

Open
#6,887 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-bug needs-triage S-needs-repro
Dominant language
Rust
Stars
7k
Forks
1.1k
Avg merge
2d 13h
Merged PRs (30d)
24

Description

Summary

Running
'cargo fmt --check -- --config unstable_features=true --config binop_separator=Back --config imports_granularity=Module --config group_imports=StdExternalCrate'
on servo github (revision f3bdb24d2a43853721ea757fee704ef250df9c56) shows everything is formatted ok
but the same command with --all (cargo fmt --check -- --config unstable_features=true --config binop_separator=Back --config imports_granularity=Module --config group_imports=StdExternalCrate) shows that the files 'components/script/dom/stream/readablestream.rs' and 'components/script/dom/webxr/xrsessions.rs' have their imports not correctly sorted.

Other files in the crate (components/script) get correctly formatted.

Meta

I am not sure if this is expected behavior or a bug but it is weird that it only seems to affect these few files.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported command at revision f3bdb24d2a43853721ea757fee704ef250df9c56, first without --all and then with it. Compare the handling of components/script/dom/stream/readablestream.rs and components/script/dom/webxr/xrsessions.rs with the other components/script files; done means explaining or fixing why --all reports import-order differences when the crate-only check does not.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.