Description
Redundant parentheses should be removed automatically. nixf-tidy / nixf-diagnose reports them, but can't auto-fix. I assume that removing these is likely much easier implemented in nixfmt than nixf-diagnose, which doesn't do any rewriting, so far.
Small example input
Random example from running nixf-diagnose on Nixpkgs:
with pkgs.perl.pkgs; makeFullPerlPath ([ mod_perl2 ])
Expected output
with pkgs.perl.pkgs; makeFullPerlPath [ mod_perl2 ]
Actual output
with pkgs.perl.pkgs; makeFullPerlPath ([ mod_perl2 ])
If this is done, #251 should probably be done first. In a way, this is also a counter-example that shows us that "redundant" is subjective... On the other side, if we want this, then that's an argument to put it into nixfmt, because that's the only way to make it play along with that issue.
Description
Redundant parentheses should be removed automatically.
nixf-tidy/nixf-diagnosereports them, but can't auto-fix. I assume that removing these is likely much easier implemented innixfmtthannixf-diagnose, which doesn't do any rewriting, so far.Small example input
Random example from running
nixf-diagnoseon Nixpkgs:Expected output
Actual output
If this is done, #251 should probably be done first. In a way, this is also a counter-example that shows us that "redundant" is subjective... On the other side, if we want this, then that's an argument to put it into
nixfmt, because that's the only way to make it play along with that issue.