spiegel_podman/.editorconfig
Kir Kolyshkin 6bd4f2141b .editorconfig: add [[shell]] section, space_redirects
1. Add [[shell]] section, which is for shfmt only to apply formatting to
   shell files that does not end with .sh or bash, but with a shebang
   line present.

2. Add space_redirects = true setting for shfmt.

Note the [[language]] syntax is not officially supported by editorconfig
standard (the discussion since at least 2019 is still ongoing, see [1])
but is supported by shfmt since v3.8.0 (February 2024).

[1]: https://github.com/editorconfig/editorconfig/issues/404

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2026-06-09 11:53:21 -07:00

22 lines
530 B
INI

# See https://EditorConfig.org
# This is a top-most EditorConfig file.
root = true
# Ignore any "vendor" directories.
[**/vendor/**]
ignore = true
# Bash, bats, and sh files use 4 spaces for indentation.
[*.{bash,bats,sh}]
indent_style = space
indent_size = 4
space_redirects = true
# This is for shell scripts with shebang but no extensions.
# Not yes supported by editorconfig[1], only by shfmt.
# https://github.com/editorconfig/editorconfig/issues/404
[[shell]]
indent_style = space
indent_size = 4
space_redirects = true