tock / libtock-rs

Rust userland library for Tock
Apache License 2.0
160 stars 105 forks source link

Coding style: add a section on list ordering. #505

Closed jrvanwhy closed 10 months ago

jrvanwhy commented 10 months ago

I've been keeping a lot of things (such as Cargo.toml package lists and mod declarations) in alphabetical order. This adds that preference to the style guide.

Rendered

bradjc commented 10 months ago

I'm pretty opposed to this, but I won't stand in the way. If this kind of thing isn't enforced by a tool ala rustfmt, I don't see how this is a good use of developer effort. Just my 2¢.

I do think it is reasonable to say this is the expected style but not enforce it on each PR, and then just open PRs like this one from time to time. I do that with a few things in tockland.

Also, maybe this is coming? https://github.com/rust-lang/rustfmt/pull/5240 I didn't read too closely.

jrvanwhy commented 10 months ago

I do think it is reasonable to say this is the expected style but not enforce it on each PR, and then just open PRs like this one from time to time. I do that with a few things in tockland.

I'm okay with this plan, since we don't have a way to enforce it automatically.

jrvanwhy commented 10 months ago

I will merge as-is, but we won't proactively enforce this during PR reviews, unless doing so would avoid a merge conflict.