Skip to content
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

Document write-mode options #2762

Closed
theduke opened this issue Jun 3, 2018 · 4 comments
Closed

Document write-mode options #2762

theduke opened this issue Jun 3, 2018 · 4 comments
Labels
good first issue Issues up for grabs, also good candidates for new rustfmt contributors

Comments

@theduke
Copy link

theduke commented Jun 3, 2018

It would be nice to have a table explaining the different write-modes in the README (and also in the --help output).

I'd do a PR but I need some help: what are the plain and coverage modes doing exactly?

write-mode description
replace replaces formatted files, creating backup filename.rs.bk files with the original content
overwrite overwrites files without creating a backup
display print full formatted content of each file
plain ???
diff show diff of formatting changes
coverage ???
checkstyle print information in checkstyle XML format
@csmoe
Copy link
Member

csmoe commented Jun 3, 2018

rustfmt has move from write_mode to emit_mode since commit

checkout emit_mode:
https://github.com/rust-lang-nursery/rustfmt/blob/f390626778c1bbb13911556d585850eb2fa67923/src/config/options.rs#L172-L187
`

@nrc nrc added the good first issue Issues up for grabs, also good candidates for new rustfmt contributors label Jun 4, 2018
@bradjc
Copy link

bradjc commented Jun 12, 2018

For anyone finding this issue (like me) note that:

  • --write-mode=overwrite is the default
  • --write-mode=check is now --check
  • --write-mode is now --emit

@ncharlton02
Copy link
Contributor

I was thinking about tackling this. Should I include the info in both (readme and --help) or just under the help flag?

@bradjc
Copy link

bradjc commented Jun 15, 2018

I vote both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Issues up for grabs, also good candidates for new rustfmt contributors
Projects
None yet
Development

No branches or pull requests

5 participants