ITADN

fix(shfmt): do not pass -ln or --indent, to respect editorconfig

#402Pull Requestscop 创建于 2026-06-02
S
scopcommented
This might be a bit controversial, but without this, as it stands, there's no way to get apheleia uses of shfmt to honor projects editorconfigs (`-ln` is passed unconditionally). FWIW in my opinion shfmt's behavior is not great there, better would be to override only editorconfig settings by ones set on the cmdline, not all of them even if anything is passed. But it seems it's intentional in shfmt. Ref https://github.com/mvdan/sh/blob/master/cmd/shfmt/shfmt.1.scd > If any parser or printer flags are given to the tool, no EditorConfig formatting options will be used. Users are better off using editorconfig to configure shfmt, so the configuration applies to all kinds of shfmt uses. <!-- To expedite the pull request process, please see the contributor guide for my projects: <https://github.com/raxod502/contributor-guide> -->
合并状态:未合并 关闭于 2026-06-05 3 条评论