From e08c424a372c489db0951289dc6499090d13b6e6 Mon Sep 17 00:00:00 2001 From: Rodrigo Espinosa Curbelo Date: Sat, 11 Apr 2026 16:42:48 -0300 Subject: [PATCH 1/2] ci: add shellcheck lint workflow Also fixes SC2005 (useless echo around command substitution) in worktree_base() so the new lint job passes. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/lint.yml | 20 ++++++++++++++++++++ bin/wt | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..9759343 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,20 @@ +name: Lint + +on: + push: + branches: [master] + pull_request: + +jobs: + shellcheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install shellcheck + run: | + sudo apt-get update + sudo apt-get install -y shellcheck + + - name: Run shellcheck + run: shellcheck bin/wt diff --git a/bin/wt b/bin/wt index 83a33e0..f0dd8ca 100755 --- a/bin/wt +++ b/bin/wt @@ -63,7 +63,7 @@ worktree_base() { else local root root="$(repo_root)" - echo "$(dirname "$root")" + dirname "$root" fi } From a3d3dcf8657490af996caa893aea1399b99021f0 Mon Sep 17 00:00:00 2001 From: Rodrigo Espinosa Curbelo Date: Sat, 11 Apr 2026 22:25:15 -0300 Subject: [PATCH 2/2] fix: lint --- bin/wt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/wt b/bin/wt index f0dd8ca..941b045 100755 --- a/bin/wt +++ b/bin/wt @@ -270,7 +270,7 @@ main() { case "$mode" in pick) - pick_worktree + pick_worktree "" ;; goto) goto_worktree "$branch"