What is Nostr?
Tom Morris /
npub187c…3rzp
2024-03-18 13:09:07

Tom Morris on Nostr: Was setting up a pre-commit hook to autoformat Nix code. If you just run `nix fmt` in ...

Was setting up a pre-commit hook to autoformat Nix code. If you just run `nix fmt` in the CLI it autoformats only .nix files. The Pre-commit framework passes a list of files, and unless you specifically write a regex to only limit it to .nix files, it'll pass every changed file (not reasonable).

`nix fmt` will take things that definitely are not Nix files and do wild stuff with them—YAML files, Makefiles, random shell scripts. So, yeah, then you need to pull the unbroken versions out of GIt.
Author Public Key
npub187cryu7vlwfmgad5mgddh3msjhjejqg7knxn604nygqv604qge5q7x3rzp