@Pol Dellaiera Is nixfmt
considered de facto/ stable now? Because the Github repo description says
The official (but not yet stable) formatter for Nix code
https://github.com/NixOS/nixfmt
Apparently RFC 166 has established it to become the standard at least
Yeah see this thingie: https://github.com/nix-community/nixvim/pull/1375#issuecomment-2039393789
I'm requiring every contributor to pass their new Nix files through nixfmt-rfc-style
since 1 month or so now.
Good to know!
Pol Dellaiera said:
every contributor
Which repo? nixpkgs?
Yes
Last example today: https://github.com/NixOS/nixpkgs/pull/317742#pullrequestreview-2118391543
In services-flake
we have a CI check that runs nixpkgs-fmt
to see that the code was formatted, but I was surprised to see that it didn't fail on your PR (cc @Shivaraj B H)
I'd welcome a dedicated PR that replaces nixpkgs-fmt
with nixfmt-rfc-style
mainly to see whether the new formatting is something we can switch over, not just for this project but for others as well. I've been happy with nixpkgs-fmt
so far.
I won't discuss the formatting, switch to nixfmt-rfc-style
if you want to, that won't change a thing in the technical side of things. It's, I believe, up to the maintainers to decide.
I don’t think nixpkgs-fmt
flake check complaints about nixfmt-rfc-style
, which is why the tests were passing.
I've already spent too much time discussing the code formatting in plenty of languages... and in the end, I always end up using the default one... even if I don't like some parts of it.
yeah that is the best approach imho, just avoid useless discussion by establishing a formatting default
Last updated: Nov 15 2024 at 12:33 UTC