diff options
| author | Markus Heiser <markus.heiser@darmarit.de> | 2025-07-16 15:54:54 +0200 |
|---|---|---|
| committer | Markus Heiser <markus.heiser@darmarIT.de> | 2025-07-28 12:53:26 +0200 |
| commit | 67e423edb25a3b565cd649a04ae73aa6446115d4 (patch) | |
| tree | 405079ee7caa9a3fece445443db8721630a5a7dc /.editorconfig | |
| parent | 7ee3dc9d74c845ad0c9cda52b300b7a4bb0da1c7 (diff) | |
[enh] CI - add shell script formatter
Implement rules and functions to format shell scripts:
$ make format.shell
or alternatively to format all source code:
$ make format
The formatter `shfmt` reads the rules from the editorconfig[1]
If any EditorConfig files are found, they will be used to apply formatting
options. If any parser or printer flags are given to the tool, no
EditorConfig files will be used.
[1] https://github.com/patrickvane/shfmt?tab=readme-ov-file#description
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to '.editorconfig')
| -rw-r--r-- | .editorconfig | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/.editorconfig b/.editorconfig index 6a1922ac7..8c626c425 100644 --- a/.editorconfig +++ b/.editorconfig @@ -14,6 +14,14 @@ charset = utf-8 # code formatter accepts length of 120, but editor should prefer 80 max_line_length = 80 +[{*.sh,manage}] +indent_style = space +indent_size = 4 + +# shfmt options +shell_variant = bash +switch_case_indent = true + [*.html] # in the jinja templates we use indent size of 2 and we do not use tabs indent_size = 2 |