Skip to content

Commit e066466

Browse files
authored
Update the documentation of ignore (rust-lang#3580)
1 parent 0c05a21 commit e066466

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Configurations.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -2325,7 +2325,8 @@ Copyright 2018 The Rust Project Developers.`, etc.:
23252325

23262326
## `ignore`
23272327

2328-
Skip formatting the specified files and directories.
2328+
Skip formatting files and directories that match the specified pattern.
2329+
The pattern format is the same as [.gitignore](https://git-scm.com/docs/gitignore#_pattern_format).
23292330

23302331
- **Default value**: format every file
23312332
- **Possible values**: See an example below
@@ -2350,6 +2351,12 @@ ignore = [
23502351
]
23512352
```
23522353

2354+
If you want to ignore every file under the directory where you put your rustfmt.toml:
2355+
2356+
```toml
2357+
ignore = ["/"]
2358+
```
2359+
23532360
## `edition`
23542361

23552362
Specifies which edition is used by the parser.

0 commit comments

Comments
 (0)