NixOS/nixfmt

nixfmt adding not needed comma after arguments

Closed this issue · 1 comments

Description

nixfmt adds a not needed comma after the last argument in an expression parameter definition. Note this does not happen if the last argument is ...

Small example input

{ foo, bar, foobar }:
{
...
}

Expected output

{
  foo,
  bar,
  foobar
}:
{
...
}

Actual output

{
  foo,
  bar,
  foobar,
}:
{
...
}

This is very much intended behavior for diffability purposes, see https://piegames.de/dumps/leading-commas/#the-issue for a more detailed explanation.

... is not followed by a comma because neither does it need one nor does the Nix syntax allow it in the first place.