microsoft / security-utilities

Security utilities for key generation, string redaction, etc.
MIT License
24 stars 9 forks source link

Rust: Enforce `rustfmt`? #71

Open jdraaijer-microsoft opened 2 months ago

jdraaijer-microsoft commented 2 months ago

Should rustfmt be enforced in the rust projects? Personally I am a fan, and it is well integrated in cargo and IDEs, and it's widely used.

Validating it in CI is simple.

Benefits are:

  1. It removes (almost) all style conflicts
  2. Look and feel of code becomes consistent, regardless of who writes the code.

Downsides:

  1. The default style may not be attractive to everyone. IMO a worthwhile tradeoff, and in the worst case it can be configured.
  2. Will require a large PR to fix all style issues up front (but only 1)
suvamM commented 2 months ago

@jdraaijer-microsoft I think this is a good idea. We'll have more people working on this codebase, so ensuring format consistency is important. I'll update the pipelines to ensure rustfmt runs.