From 9e0778b5e8b8bbd4d5e8a7af16bd8abcb8e28dbc Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sun, 29 May 2022 19:58:00 +0000 Subject: [PATCH 1/3] chore(pre-commit): update scop/pre-commit-shfmt to v3.5.1-1 --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index af02504b404..08949c0517b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: stages: [commit-msg] - repo: https://github.com/scop/pre-commit-shfmt - rev: v3.4.3-1 + rev: v3.5.1-1 hooks: - id: shfmt-docker types: [text] From 007c1472480f5f6d94156e5a350a52856304b852 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 29 May 2022 23:39:21 +0300 Subject: [PATCH 2/3] ci(pre-commit): show diff on failure Mainly for shfmt, which writes its changes in place. shfmt has the `-d` option which would output the diff for us, but showing the diff on pre-commit level is preferable in CI in the first place. And the diff emitted by it has colors, unlike the shfmt one. --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cc936115e37..5d4daa09fa7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -67,7 +67,7 @@ jobs: # Other pre-commit checks set +e - pre-commit run --color=always --all-files + pre-commit run --color=always --all-files --show-diff-on-failure ((rc+=$?)) set -e From 055a7c00d87155d8b1f494fcb41ead19d33696c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 29 May 2022 23:39:48 +0300 Subject: [PATCH 3/3] style(tar): reformat with shfmt 3.5.1 --- completions/tar | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/completions/tar b/completions/tar index 1c5fe851cec..ede594590d0 100644 --- a/completions/tar +++ b/completions/tar @@ -383,8 +383,7 @@ __tar_adjust_PREV_from_old_option() # deal with old style arguments here # $ tar cfTC # expects this sequence of arguments: # $ tar cfTC ARCHIVE_FILE PATTERNS_FILE CHANGE_DIR - if ((old_opt_used == 1 && cword > 1 && \ - cword < ${#old_opt_parsed[@]} + 2)); then + if ((old_opt_used == 1 && cword > 1 && cword < ${#old_opt_parsed[@]} + 2)); then # make e.g. 'C' option from 'cffCT' prev="-${old_opt_parsed[cword - 2]}" fi