-
Notifications
You must be signed in to change notification settings - Fork 207
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
devops: rustfmt only runs on staged files #4477
Conversation
What's the advantage of running Why would they give different outputs? |
@m-span is there any chance you might have local configs which cause different outputs? If I pull this branch and then run |
What is the intended developer experience? Every PR must have all rust files formatted, or each PR only expects changed files to be formatted? |
I ask because in order for other branches to 'pass', they have to cargo fmt files that weren't even affected? If this is a hard requirement, how did it get desynced? |
I don't think it is desynced! Expressed as humbly as possible — yours is the first system to have these formatting issues — are you sure it's not something up with your end? From above:
For a hard test — CI checks |
Is there possibly a config file in one of these locations:
From https://rust-lang.github.io/rustfmt/?version=v1.6.0&search= |
problem was with my environment |
files were starting to deviate from rustfmt, making diffs of other branches more complex
fmt stage is now written within yaml file, so no more network issues
by using
rustfmt
instead ofcargo fmt
, the pre-commit fmt only runs on staged filesall files have also been run against
rustfmt