Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
zmrocze opened this issue Jan 28, 2024 · 2 comments
Open

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

zmrocze opened this issue Jan 28, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@zmrocze
Copy link

zmrocze commented Jan 28, 2024

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.0
  • nix 2.18.0
  • treefmt-nix rev 8cd95da6c30852adb2a06c4b6bdacfe8b64a0, used with nixpkgs:
    treefmt-nix = {
      url = "github:numtide/treefmt-nix";
      inputs.nixpkgs.follows = "nixpkgs";
    };
@zmrocze zmrocze added the bug Something isn't working label Jan 28, 2024
@montchr
Copy link

montchr commented Jul 6, 2024

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

@montchr
Copy link

montchr commented Jul 6, 2024

numtide/treefmt#342

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants