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
{{ message }}
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.
Alternatively, maybe nixpkgs-fmt should move the trailing else to the next line before autoindenting. It appears that newline-before-else is much more common:
In my opinion yes. Whenever a = is followed by an expression spanning multiple lines, there should always be a \n after the =. Because otherwise those lines cannot be logically aligned correctly to each other. Especially with larger expressions this is very important for readability.
Also I totally think that if/else should almost always be formatted like this:
if bool_expression1 then
indented_child_expression1
else if bool_expression2 then
indented_child_expression2
else
indented_child_expression3
Then again, there is the question of how much freedom the developer should be given. There are always some special cases where an alternative format can make sense.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
bugSomething isn't workingformattingIssue with the output format
Describe the bug
the following source:
... is formatted to
Expected behavior
A continuation of a expression in the next line should always be indented.
System information
The text was updated successfully, but these errors were encountered: