Configure Bash script format rules

This commit is contained in:
Fabio Scotto di Santolo
2025-08-03 22:16:27 +02:00
parent 8f1b6c2ab2
commit 7bd5670b80
2 changed files with 58 additions and 38 deletions

20
.editorconfig Normal file
View File

@@ -0,0 +1,20 @@
[*.sh]
indent_style = space
indent_size = 2
# --language-variant
shell_variant = posix
binary_next_line = true
# --case-indent
switch_case_indent = true
space_redirects = true
keep_padding = true
# --func-next-line
function_next_line = true
# Ignore the entire "third_party" directory when calling shfmt on directories,
# such as "shfmt -l -w .". When formatting files directly,
# like "shfmt -w third_party/foo.sh" or "shfmt --filename=third_party/foo.sh",
# the ignore logic is applied only when the --apply-ignore flag is given.
[third_party/**]
ignore = true