treefmt-nix
treefmt-nix copied to clipboard
Format check fails but `nix fmt` brings no changes.
Describe the bug
Hi!
Format check fails. But running the formatter doesn't modify anything. It's all formatted but check fails.
To Reproduce
Steps to reproduce the behavior:
At this commit first run:
nix fmt
Observe 0 files changed output.
Then run:
nix build .\#checks.x86_64-linux.treefmt
The build fails.
Expected behavior
The build doesn't fail or the formatter formats.
System information
This flake. That is:
treefmt 0.6.0nix 2.18.0treefmt-nixrev8cd95da6c30852adb2a06c4b6bdacfe8b64a0, used with nixpkgs:
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
I am also encountering this issue with treefmt v2.0.1, running via cachix/git-hooks.nix.
https://github.com/numtide/treefmt/issues/342