Open source Nest implementation

#5 Missed rustfmt config

Closed on October 14, 2021
fzzr on October 14, 2021

This is not required, but will be great if you add it to the root of project.

It needed because not all people using default config and have personal preferences in ~/.rustfmt[.toml]. Also “defaults” can be charged and doesn’t equal “standard”.

You can get currently used config with rustfmt --print-config=current $PWD where PWD pointing to your project.

Please just export your current config, then remove unimportant properties.

zj on October 14, 2021

Closing this, as I ran and recorded the change requested. Didn’t know one could override with a $HOME/.rustfmt, so this is definitely an improvement! Thanks

zj closed this discussion on October 14, 2021
fzzr on October 14, 2021

Heh…

Please remove unnecessary lines. Also they can break some IDE tools probably.

unstable_features = false
disable_all_formatting = false
skip_children = false
hide_parse_errors = false
error_on_line_overflow = false
error_on_unformatted = false
report_todo = "Never"
report_fixme = "Never"
ignore = []
emit_mode = "Files"
make_backup = false
fzzr reopened this discussion on October 14, 2021
fzzr on October 14, 2021

Also next:

edition = "2015"
version = "One"
color = "Auto"
required_version = "1.4.37" # <-- also unnecessary if using without unstable_features
zj on October 14, 2021

@fzzr how do you know what to add and remove? I’m more than happy to apply a patch if you have one.

fzzr on October 14, 2021

There’s approximately two kinds of properties:

  1. code style configuration
  2. rustfmt tool configuration

So, we need first one only. We can specify it for other users.

But we shouldn’t specify second group properties because

  • it’s your personal at all
  • it’s can be changed / overriden each time, each tool execution (by hands, by IDE, etc…)
fzzr on October 14, 2021

So, please, just remove following lines:

disable_all_formatting = false
skip_children = false
hide_parse_errors = false
error_on_line_overflow = false
error_on_unformatted = false
report_todo = "Never"
report_fixme = "Never"
ignore = []
emit_mode = "Files"
make_backup = false
edition = "2015"
version = "One"
color = "Auto"
required_version = "1.4.37"

And maybe unstable_features = false too. But I’m not sure.

🤗

zj added a change on October 14, 2021
Q3LA6YFZK4OFJTXDJIBUQTLQAHLBSCBLIVBGXJRS2TDJJRKCTESQC
main
zj on October 14, 2021

Applied!

zj closed this discussion on October 14, 2021
fzzr on October 14, 2021

Awesome! Thanks! ❤️