formatters-spec: clarify syntax and semantics rule

This commit is contained in:
zimbatm 2022-08-09 10:37:45 +02:00
parent f400c2f320
commit 2af3933b4b
No known key found for this signature in database
GPG Key ID: 71BAF6D40C1D63D7
2 changed files with 2 additions and 3 deletions

View File

@ -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.

View File

@ -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"]