Closed amtoine closed 1 year ago
It's for the rare case that the file is formatted, and you run the formatter anyways.
In that case, instead of printing to stdout only formatting file...
we can print
formatting file...
file is formatted correctly
if we check and did no change at all.
oooooh i get it, thanks for the clarification :yum:
maybe file is already formatted correctly
would be clearer? :open_mouth:
That sounds great!
@AucaCoyan
i'm a bit confused about that part of
format_single_file
, why do we want the code before and after to be equal? :open_mouth: https://github.com/nushell/nufmt/blob/1765f8e5191b42aad4c7b72b89bef1de05a4eed2/src/lib.rs#L21-L23and followup question, why don't we have a similar test and debug statement in
format_string
?