From 6ecde8c2b1da560b3c78ce37b64395b8080f9070 Mon Sep 17 00:00:00 2001 From: Yedaya Katsman Date: Mon, 1 Jun 2026 22:48:43 +0300 Subject: [PATCH 1/3] test(runLint): Only check bash in completions-* Removes this false positive: ``` ***** invoke grep, ls, sed, and cd through "command", e.g. "command grep" completions-core/Makefile.am:852: $(ss) cd \ ``` --- test/runLint | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/runLint b/test/runLint index 1e422a766bc..c389a7786ec 100755 --- a/test/runLint +++ b/test/runLint @@ -3,8 +3,8 @@ set -u gitgrep() { - local pathspecs=('bash_completion' 'completions-fallback/' - 'completions-core/' 'test/' 'bash_completion.d/' ':!:test/runLint' + local pathspecs=('bash_completion' 'completions-fallback/*.bash' + 'completions-core/*.bash' 'test/' 'bash_completion.d/' ':!:test/runLint' ':!:test/docker/' ':!:test/test-cmd-list.txt') local filter_list read -ra filter_list <<<"$filter_out" From 789a68bc024cb2155ba728aed67749ce31fc531f Mon Sep 17 00:00:00 2001 From: Yedaya Katsman Date: Mon, 1 Jun 2026 23:17:18 +0300 Subject: [PATCH 2/3] refactor(ccze): Move "complete" and "sed" to same line To remove a false positive from ./test/runLint --- completions-core/ccze.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/completions-core/ccze.bash b/completions-core/ccze.bash index 34f06639206..337d7f3b827 100644 --- a/completions-core/ccze.bash +++ b/completions-core/ccze.bash @@ -29,8 +29,8 @@ _comp_cmd_ccze() return ;; --plugin | -${noargopts}p) - _comp_compgen_split -- "$("$1" --list-plugins | command \ - sed -ne 's/^\([a-z0-9]\{1,\}\)[[:space:]]\{1,\}|.*/\1/p')" + _comp_compgen_split -- "$("$1" --list-plugins | + command sed -ne 's/^\([a-z0-9]\{1,\}\)[[:space:]]\{1,\}|.*/\1/p')" return ;; esac From 18d90e145b20cdff81c6802c0f59712ff4389862 Mon Sep 17 00:00:00 2001 From: Yedaya Katsman Date: Mon, 1 Jun 2026 23:25:53 +0300 Subject: [PATCH 3/3] test(runLint): Don't check for single bracket ifs This is already enabled in .shellcheckrc: enable=require-double-brackets --- test/runLint | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/runLint b/test/runLint index c389a7786ec..184f3d27c17 100755 --- a/test/runLint +++ b/test/runLint @@ -72,9 +72,6 @@ gitgrep '@\([^()|$]+\)' \ #------------------------------------------------------------------------------ # Bash pitfalls/styles/compatibilities (which are not detected by shellcheck) -filter_out='test/ bash_completion.sh.in' gitgrep ' \[ ' \ - 'use [[ ]] instead of [ ]' - gitgrep "$cmdstart"'unset [^-]' 'Explicitly specify "unset -v/-f"' filter_out="test/config/bashrc" gitgrep "$cmdstart"'((set|shopt)\s+[+-][a-z]+\s+posix\b|(local\s+)?POSIXLY_CORRECT\b)' \