switch from alejandra -> nixpkgs-fmt #12
No reviewers
Labels
No Label
backups
blog
bootstrapping
bug
changes-requested
cli
documentation
duplicate
enhancement
facts
help wanted
invalid
Inventory
low_prio
manager
modules
needs-review
networking
packaging
question
secrets
template
test
tooling
user-testing
vm
wontfix
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: clan/clan-core#12
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "formatting"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
alejandra has someone questionable choices for formatting that no one would apply to there code if they would format manually.
nixpkgs-fmt seems to produce more readable results.
I do not want to start a fight about formatters but kindly want to express my disagreement.
I think some of the formatting patterns which nixpkgs adopted from the haskell world are bad for several reasons. Some of them are visible in this diff -> see comments blow.
Anyways, I'm fine with nixpkgs-fmt, if that's the preferred choice of the team.
Currently there is a lot of activity in RFC 101 where they now develop a proper formal standard for nix code formatting.
They currently test their rules on a branch if nixfmt.
I actually just tried it and the formatting choices seem to be a mix between alejandra and nixpkgs-fmt.
Once the standard is out we will have to re-format the whole thing again anyways I guess.
@ -4,1 +1,3 @@
...
{ self
, inputs
, ...
Not sure if that is better? The lines are not conform and start with different characters. You cannot simply re-order the lines without breaking stuff for example.
@ -7,3 +6,3 @@
inputs.treefmt-nix.flakeModule
];
perSystem = {pkgs, ...}: {
perSystem = { pkgs, ... }: {
Is that really more readable or just more to type?
@ -21,0 +16,4 @@
, config
, self
, ...
}: {
Is this indentation preferable?
fixed in #14
@ -5,0 +2,4 @@
, system ? builtins.currentSystem
,
}:
let
and this?