Closed FrankKair closed 3 years ago
Not a bad idea - I really liked how Go implemented gofmt, a consistent code styling tool which auto formats codebases into a particular style. The only problem with this, is the lack of customizability. Everything must look the same, but what if certain companies/teams prefer to have brackets below compared to after a function declaration?
I think an interesting addition would be a tool which has a per project .format.toml file which the project managers could create and maintain settings for each cargo project, if they choose to override the default settings.
There are some things that are conventions and styles that Mozilla / Rust team recommends, and writing code that deviates too much from these pattern is somewhat confusing for beginners. It's always best to enforce the best practices / styles adopted by the community.
I had tried fixing that to an extent in some of my early commits. Happy to offer any further help. :)
Hi, I think it would be nice to have a more consistent pattern, because some files differ a lot in coding style.
Examples:
Even though someone could just "fix" this, I think that looking into some
lint
tool for Rust or some CI (like Travis) would be worth it.What do you guys think?