-
Notifications
You must be signed in to change notification settings - Fork 689
Enforce code style with rustfmt #1657
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
Conversation
I'd like to see it done at some point, but there's a few reasons I haven't pushed for it yet.
|
Signed-off-by: Alex Saveau <[email protected]>
Okey dokes, that makes sense. Let's kill two birds with one stone then: fmt is run on every change and it only runs on the changed files, allowing for an incremental migration. This kind of sucks during the migration period since PRs will include extraneous changes, but I can't think of any better way to do it without completely ripping off the bandaid and breaking the 70 open PRs. It works: success on no changed files and failure on changed files. |
Signed-off-by: Alex Saveau <[email protected]>
Incidentally I think this approach will still break every open PR, since their builds will fail with formatting changes unless the files they modify are already perfect. Without My preference would be that we get the next release out the door (0.24.0) and work through the backlog of mergeable and trivially rebase-able PRs, and then revisit turning on @asomers what are your thoughts? |
Works for me. I'll let you rip the bandaid and then you can merge this to add enforcement. |
I agree exactly. |
Any chances to get this merged? While it will break any non formatted pull request, fixing it is as simple as formatting it again. With editor configured to auto format rust on safe working on non formatted files is very unpleasant. |
Should be closed by #1748 |
Closed by #1748 |
Is this a desirable change? Or maybe a better question: is there a reason this hasn't been done before?