Open nothingelsematters opened 3 years ago
Here is another example which triggers this false positive:
rec {
defaultApp = 1;
apps.default = defaultApp;
devShell = 2;
devShells.default = devShell;
}
results in Unneeded 'rec' on set at fp.nix:1:1-7:2
.
Interestingly, if one comments out either the apps.default
or devShells.default
line the error is gone.
Example:
It is treated as unneeded
rec
nowI need this
rec
here, because otherwise it results in:undefined variable 'a' at ...