hohav / peppi

Rust parser for Slippi SSBM replay files
MIT License
37 stars 9 forks source link

Add rustfmt config and format all files #7

Closed NickCondron closed 1 year ago

NickCondron commented 2 years ago

I suggest using the official Rust code formatter rustfmt: https://github.com/rust-lang/rustfmt

I added a rustfmt.toml file that can define custom configs (see https://rust-lang.github.io/rustfmt/?version=v1.5.0). Right now it is setup to use tabs for indentation to fit the project (spaces are the default). The file can also be made hidden .rustfmt.toml.

I know code formatting can be a touchy subject. I think the decision should be left to the maintainer. You can effectively disable rustfmt by setting disable_all_formatting to true.

Whichever approach is used, having a rustfmt config file should make maintaining the project and contributing to the project a little bit easier.

hohav commented 2 years ago

This is a good idea, I just need to figure out what formatter settings I can stomach. I also plan to merge some major work I'm doing first, to avoid rebasing.

hohav commented 1 year ago

Closing because I ended up re-running rustfmt separately in c5582dab605aceb7cd7ef3e2380fdb6b9ff3df25. Thanks for suggesting this!