You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe the intention of being somewhat permissive here is to minimise patch differences where entries are frequently added/removed from a set or a list:
E.g.:
{
example = {
- hello = "world";
};
}
vs
{
- example = {- hello = "world";- };+ example = { };
}
That said, I don't have a strong opinion on whether this is more important than producing a consistent output style.
Negative. Preserving line breaks and preserving newlines are two different things in Nixfmt.
The original issue for which things got implemented was #188, however I don't remember if the wording in the specification was added before that or due to that.
CC @infinisil you implemented this, I'd like to hear your position.
Description
Originally requested by @mightyiam in #297
Should we ensure that empty attrsets are always formatted the same way?
Small example input
Expected output
Actual output
The text was updated successfully, but these errors were encountered: