Skip to content

Commit 37a2f4f

Browse files
committed
fix(ci): repair corrupt shellcheck.yml, add SC2086 disables, exclude docker_aliases from shfmt
- Replace 0x01 control char (corrupted jobs: key) in shellcheck.yml - Add # shellcheck disable=SC2086 on 5 grp* functions — word splitting intentional for space-separated $services list passed to docker compose - Exclude docker_aliases.sh from shfmt — zsh ${(f)...} syntax is incompatible with shfmt parser
1 parent 3772e12 commit 37a2f4f

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

‎.github/workflows/shellcheck.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ concurrency:
1515
group: ${{ github.workflow }}-${{ github.ref }}
1616
cancel-in-progress: true
1717

18-
18+
jobs:
1919
shellcheck:
2020
runs-on: ubuntu-latest
2121
timeout-minutes: 5

‎.pre-commit-config.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ repos:
4444
hooks:
4545
- id: shfmt
4646
args: [--write, --indent, '2', --case-indent, --binary-next-line]
47+
exclude: ^docker_aliases\.sh$ # zsh-specific ${(f)...} syntax is incompatible with shfmt
4748

4849
- repo: https://github.com/adrienverge/yamllint
4950
rev: v1.35.1

‎docker_aliases.sh‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ function grpdown {
254254
services=$(_dc_group "$grp")
255255
[[ -z "$services" ]] && { _dc_red "No services in group: $grp"; return 1; }
256256
_dc_blue "Stopping $grp: $services"
257+
# shellcheck disable=SC2086 # word splitting intentional — $services is space-separated list
257258
_dc_compose stop $services "$@"
258259
_dc_green "$grp stopped"
259260
}
@@ -265,6 +266,7 @@ function grpup {
265266
services=$(_dc_group "$grp")
266267
[[ -z "$services" ]] && { _dc_red "No services in group: $grp"; return 1; }
267268
_dc_blue "Starting $grp: $services"
269+
# shellcheck disable=SC2086 # word splitting intentional — $services is space-separated list
268270
_dc_compose up -d $services "$@"
269271
_dc_green "$grp started"
270272
}
@@ -275,6 +277,7 @@ function grplogs {
275277
local services
276278
services=$(_dc_group "$grp")
277279
[[ -z "$services" ]] && { _dc_red "No services in group: $grp"; return 1; }
280+
# shellcheck disable=SC2086 # word splitting intentional — $services is space-separated list
278281
_dc_compose logs -f $services "$@"
279282
}
280283

@@ -284,6 +287,7 @@ function grpps {
284287
local services
285288
services=$(_dc_group "$grp")
286289
[[ -z "$services" ]] && { _dc_red "No services in group: $grp"; return 1; }
290+
# shellcheck disable=SC2086 # word splitting intentional — $services is space-separated list
287291
_dc_compose ps $services "$@"
288292
}
289293

@@ -294,6 +298,7 @@ function grprestart {
294298
services=$(_dc_group "$grp")
295299
[[ -z "$services" ]] && { _dc_red "No services in group: $grp"; return 1; }
296300
_dc_blue "Restarting $grp: $services"
301+
# shellcheck disable=SC2086 # word splitting intentional — $services is space-separated list
297302
_dc_compose restart $services "$@"
298303
_dc_green "$grp restarted"
299304
}

0 commit comments

Comments
 (0)