mirror of
https://github.com/numtide/treefmt.git
synced 2024-08-17 04:40:27 +03:00
formatters-spec: clarify syntax and semantics rule
This commit is contained in:
parent
f400c2f320
commit
2af3933b4b
@ -31,8 +31,7 @@ $ rustfmt --edition 2018 src/main.rs src/lib.rs
|
||||
|
||||
## Formatting details
|
||||
|
||||
A formatted file MUST be valid. This is a strong contract; the syntax or
|
||||
semantic must never be broken by the formatter.
|
||||
A formatter MUST preserve validity. This is a strong contract; the syntax and semantics must never be broken by the formatter.
|
||||
|
||||
A formatter SHOULD be idempotent. Meaning that if the formatter it run
|
||||
twice on a file, the file should not change on the second invocation.
|
||||
|
@ -28,7 +28,7 @@ excludes = ["examples/haskell/"]
|
||||
|
||||
[formatter.nix]
|
||||
command = "nixpkgs-fmt"
|
||||
includes = ["*.nix", ".foo.nix"]
|
||||
includes = ["*.nix"]
|
||||
# Act as an example on how to exlude specific files
|
||||
excludes = ["examples/nix/sources.nix"]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user