Open maralorn opened 2 years ago
I have a fun one. A situation where the useless_parens lint is triggered, although removing the parentheses changes the semantics.
Consider
(builtins.foldl') or "false" list_of_something_boolish
where or is a not a keyword but a regular function from my code. This is not equivalent to
or
builtins.foldl' or "false" list_of_something_boolish
where or is part of the . operator. (compare first entry in this list: https://nixos.org/manual/nix/stable/expressions/language-operators.html)
.
I admit this is a bit esoteric, but this was the easiest way not have the or interpreted as the operator and the false positive warning happened to me without searching for it.
I have a fun one. A situation where the useless_parens lint is triggered, although removing the parentheses changes the semantics.
Consider
where
or
is a not a keyword but a regular function from my code. This is not equivalent towhere
or
is part of the.
operator. (compare first entry in this list: https://nixos.org/manual/nix/stable/expressions/language-operators.html)I admit this is a bit esoteric, but this was the easiest way not have the
or
interpreted as the operator and the false positive warning happened to me without searching for it.