-
Notifications
You must be signed in to change notification settings - Fork 893
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
The status of git-rustfmt #4103
Comments
To be honest, I'm not sure. I believe it's complete in terms of the original scope when it was added but it's not a core part of rustfmt like It's probably worth revisiting to codify the desired capabilities (format only modified files, format only modified lines, etc.)and determining what the delta is between the current and desired states, if any.
👍 |
I'd like to start working on it, at least get it to a minimal working binary (right now it doesn't really work) CC @topecongiro @nrc |
Thank you for your interest in contributing to rustfmt! TBH, I've never used
Thoughts? |
Sound good, I think I like the idea of trying to stay close to git diff, although what behavior should I think I'll start playing with it and adding features, mostly passing them through to git diff except the flags that I'm also trying to decide if I want to use the current approach and execute |
The conversation on #1324 may be of interest for this thread |
There's also cargo scout that may be worth checking out as well |
For projects where you can rely on everything being formatted, instead of this seemingly-abandoned diff formatter, you can simply make git store only properly formatted code:
At the cost of force-reformatting all legacy code you interact with (which probably shouldn't exist in 2024 anymore), all diffs etc are always well behaved from here on. |
As someone who's editor is already set to fmt-on-save, I can tell you that there are many rust projects out there that simply refuse to use rustfmt, often deliberately. Unconditionally forcing your |
You can disable the thing per git repository. I've had to do that too, but I mostly welcome knowledge that the project I'm looking at is being weird. |
Hi,
I started looking into writing my own tool that wraps rustfmt and git together and then I stumbled into https://github.com/rust-lang/rustfmt/blob/master/Cargo.toml#L30
What's the status of this tool? I see it's not in rustup components. if it doesn't quite work yet I'd like to help working on it.
Thank you :)
The text was updated successfully, but these errors were encountered: