nixfmt icon indicating copy to clipboard operation
nixfmt copied to clipboard

The official (but not yet stable) formatter for Nix code

Results 67 nixfmt issues
Sort by recently updated
recently updated
newest added

### Description When run on a file to be formatted in place nixfmt does not persist file ownership. When run as a user that is not the owner of the...

Sort alphabetically identifier keys in sets and let abstraction. More complex ways to specify keys, like "inherit" statement or interpolated sorts after plain identifier keys, but without any meaningful order...

Before this, symlinks were replaced with a formatted file rather than formatting the file behind the symlink. The choice was between ignoring symlinks and following them. Following symlinks means potentially...

input: ```nix rec { quux = "bar"; a = "foo $$\${quux} bar"; b = "foo $$${quux} bar"; } ``` Expected to be unchanged. nixfmt: ```nix rec { quux = "bar";...

Given the expression ```nix let a = 0; in # checking if a == 0 if a == 0 then "a is zero" else "a is not zero" ``` `nixfmt`...

There is no reason to be sending downstream dependencies for a for loop. Includes missing devShells.

### Description `nixfmt` errors when a carriage return is used as a linebreak in a comment. ### Small example input ```nix { x = #^M1; } ``` (Where `^M` is...

bug

Nixpkgs editorconfig has a couple of exceptions, we should make sure if we can drop them after reformat: ``` [eggs.nix] trim_trailing_whitespace = unset [nixos/modules/services/networking/ircd-hybrid/*.{conf,in}] trim_trailing_whitespace = unset [pkgs/build-support/dotnetenv/Wrapper/**] end_of_line =...