-
Notifications
You must be signed in to change notification settings - Fork 931
Document --dump-default-config
in README.md
#1982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks good. A couple of possible improvements inline.
README.md
Outdated
@@ -209,6 +209,8 @@ options covering different styles. File an issue, or even better, submit a PR. | |||
* When you run rustfmt, place a file named `rustfmt.toml` or `.rustfmt.toml` in | |||
target file directory or its parents to override the default settings of | |||
rustfmt. | |||
* You can dump the default configuration with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to expand on this a little bit - something like "Rustfmt is configured using a toml file. You can..."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think it is necessary? It is already mentioned in the first paragraph of the "Configuring Rustfmt" section and implied by the second bullet under "Tips".
(By the way, thanks for taking the time to review my silly PRs! :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the tips section should be readable by itself (I often refer people to the tips section directly with a URL). Maybe you don't need to be as verbose as my suggestion given the first tip, but you should maybe mention "rustfmt.toml' or something (currently the first tip talks about rustfmt.toml and settings, and the second tip talks about configuration, it is not clear they are the same thing).
README.md
Outdated
@@ -209,6 +209,8 @@ options covering different styles. File an issue, or even better, submit a PR. | |||
* When you run rustfmt, place a file named `rustfmt.toml` or `.rustfmt.toml` in | |||
target file directory or its parents to override the default settings of | |||
rustfmt. | |||
* You can dump the default configuration with | |||
`rustfmt --dump-default-config rustfmt.toml` and customize it as needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need rustfmt.toml
here, it will use that file name as default if you don't specify anything
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In bin/rustfmt.rs it does not look like there is a default for the path. Also:
~/dev/rust/hello_cargo/src (master #)$ rustfmt --dump-default-config
Argument to option 'dump-default-config' missing
...
~/dev/rust/hello_cargo/src (master #)$ rustfmt --version
0.2.6-nightly ( )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, there was meant to be a default (I'm sure it was mentioned when we landed this). I guess leave it as is then (if you could file an issue for making a default, that would be great!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done: #1988
Will wait for it to be closed before updating this PR.
Thanks!
Fixes #317