numtide / treefmt-nix

treefmt nix configuration
https://numtide.github.io/treefmt/
MIT License
247 stars 75 forks source link

`programs.shfmt.indent_size` breaks shfmt config #96

Closed sellout closed 1 year ago

sellout commented 1 year ago

Passing any formatting option to shfmt causes it to ignore the EditorConfig-based formatting config (see “If any parser or printer flags are given to the tool, no EditorConfig files will be used” in the README.

treefmt-nix will always pass -i to shfmt, causing it to ignore the actual configuration. There is no option to “unset” programs.shfmt.indent_size.

I think indent_size should allow (and default to) null, only passing -i if explicitly requested.