Skip to content

Commit b0ece6b

Browse files
committed
Lightly documented check WriteMode
1 parent 533df58 commit b0ece6b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,16 @@ read data from stdin. Alternatively, you can use `cargo fmt` to format all
9898
binary and library targets of your crate.
9999

100100
You'll probably want to specify the write mode. Currently, there are modes for
101-
`diff`, `replace`, `overwrite`, `display`, `coverage`, `checkstyle`, and `plain`.
101+
`check`, `diff`, `replace`, `overwrite`, `display`, `coverage`, `checkstyle`, and `plain`.
102102

103103
* `overwrite` Is the default and overwrites the original files _without_ creating backups.
104104
* `replace` Overwrites the original files after creating backups of the files.
105105
* `display` Will print the formatted files to stdout.
106106
* `plain` Also writes to stdout, but with no metadata.
107107
* `diff` Will print a diff between the original files and formatted files to stdout.
108108
Will also exit with an error code if there are any differences.
109+
* `check` Similar to `diff`, but is intended to be run in during CI and returns error code 1
110+
on failure instead of 4 as `diff` does.
109111
* `checkstyle` Will output the lines that need to be corrected as a checkstyle XML file,
110112
that can be used by tools like Jenkins.
111113

0 commit comments

Comments
 (0)