numtide / treefmt-nix

treefmt nix configuration
https://numtide.github.io/treefmt/
MIT License
202 stars 58 forks source link

Format check fails but `nix fmt` brings no changes. #156

Open zmrocze opened 5 months ago

zmrocze commented 5 months ago

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:

montchr commented 4 days ago

I am also encountering this issue with treefmt v2.0.1, running via cachix/git-hooks.nix.

montchr commented 4 days ago

https://github.com/numtide/treefmt/issues/342