-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Have an enforced code style #8981
Comments
This is also mentioned briefly here: https://hackmd.io/u_HZ86QHRm2Rp1gG1b2R1g?view |
Most of substrate's clients will expect cargo fmt. If rustc can do it then I can't see why we can't. |
some historical discussion on this subject: |
Not unexpected. Perfection is impossible, but consistency is possible. We will not be able to rust fmt the codebase in a way that everyone is happy with, but perhaps we can do it such that no one person is too unhappy with the result. That would be a win. |
Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions. |
I still find the issue relevant, we should conclude on the opened PR |
Totally agree. Spent a lot of time over the last day or two altering line
lengths and formatting. It should be a thing of the past.
…On Thu, 8 Jul 2021 at 09:42, Guillaume Thiolliere ***@***.***> wrote:
I still find the issue relevant, we should conclude on the opened PR
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#8981 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGEJCF74B4HM2TAQFY2W4TTWVQIVANCNFSM454X73UA>
.
|
We can close this issue now or should we do the same for polkadot? |
Can be closed now. |
At the moment, we don't have any setup for code formatters such as
cargo fmt
. This means that developers manually have to do things such as break off lines at the appropriate column wide. These things take up time needlessly and I think it'd be better to have an enforced, consistent style across the codebase.My proposal for this would be to have a rustfmt.toml that conforms to the existing style of the codebase as much as possible. We could then run
cargo fmt
on CI, or request that PR authors run it.The text was updated successfully, but these errors were encountered: