Skip to content

Commit b5a3d7e

Browse files
committed
add switch case indent in editorconfig
1 parent 132e706 commit b5a3d7e

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

.editorconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ max_line_length = off
3838

3939
[*.sh]
4040
indent_size = 4
41+
switch_case_indent = true
4142
max_line_length = off
4243

4344
[.bash*]

.github/workflows/shell-lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
globalStatus=0
4141
4242
while IFS= read -r -d '' f; do
43-
if ! uv run shfmt --diff --indent 4 -- "$f"; then
43+
if ! uv run shfmt --diff --indent 4 --case-indent -- "$f"; then
4444
echo "[ERROR] shfmt failed for $f"
4545
globalStatus=1
4646
fi

.hooks/pre-commit.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function shell_lint() {
3636
continue
3737
fi
3838

39-
if ! uv run shfmt --diff --indent 4 -- "$f"; then
39+
if ! uv run shfmt --diff --indent 4 --case-indent -- "$f"; then
4040
block "[ERROR] shfmt failed for $f"
4141
fi
4242

0 commit comments

Comments
 (0)