Skip to content

Commit e47674d

Browse files
committed
Clarify in the spec that the formatter MUST process the given files
Some formatters are aware of VCS systems like git, and "helpfully" skip over files that are not tracked by the VCS system. This doesn't play nicely with treefmt, because treefmt expects to be able to generate tempfiles (which are not tracked by a VCS) and pass them to the formatter.
1 parent 714cf33 commit e47674d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/formatter-spec.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ $ rustfmt --edition 2018 src/main.rs src/lib.rs
3838
```
3939

4040
> [!IMPORTANT]
41+
> It _MUST_ process the specified files. For example, it _MUST_ NOT ignore files because they are not tracked by a VCS.
42+
>
4143
> It _SHOULD_ processes only the specified files. Files that are not passed _SHOULD_ never be formatted.
4244
4345
### 2. Write to changed files

0 commit comments

Comments
 (0)