From 2a3416289f91a7eb4896ee81419958a00235b0cf Mon Sep 17 00:00:00 2001 From: Ben Rozsa Date: Sun, 28 Sep 2025 17:03:03 +0200 Subject: [PATCH 1/2] ci: ensure shellcheck finds root dotfiles --- .github/workflows/shellcheck.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index 765453e..9fb4762 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -27,14 +27,14 @@ jobs: shell: bash run: | set -euo pipefail - mapfile -t files < <(git ls-files \ - '**/*.sh' \ - '**/*.bash' \ - '**/*.zsh' \ - '**/.bashrc' \ - '**/.bash_aliases' \ - '**/.zshrc' \ - '**/.profile') + mapfile -t files < <(git ls-files -- \ + ':(glob)**/*.sh' \ + ':(glob)**/*.bash' \ + ':(glob)**/*.zsh' \ + ':(glob)**/.bashrc' \ + ':(glob)**/.bash_aliases' \ + ':(glob)**/.zshrc' \ + ':(glob)**/.profile') if [ "${#files[@]}" -eq 0 ]; then echo "No shell files to check." exit 0 From ae27f5e3083f6b2acbbd8b05f2c21528c3c0d13d Mon Sep 17 00:00:00 2001 From: Ben Rozsa Date: Sun, 28 Sep 2025 17:04:24 +0200 Subject: [PATCH 2/2] chore: set shellcheck targets for rc files --- .bash_aliases | 1 + .bashrc | 1 + .zshrc | 1 + 3 files changed, 3 insertions(+) diff --git a/.bash_aliases b/.bash_aliases index eb4a411..a1edd59 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -1,3 +1,4 @@ +# shellcheck shell=bash # --- Config shortcuts --- alias zshconfig="vi ~/.zshrc" alias aliasconfig="vi ~/.bash_aliases" diff --git a/.bashrc b/.bashrc index b38119b..c382d54 100644 --- a/.bashrc +++ b/.bashrc @@ -1,3 +1,4 @@ +# shellcheck shell=bash # Minimal Fedora-focused Bash config # Source global definitions (present on Fedora) diff --git a/.zshrc b/.zshrc index da0b83e..da5acc7 100644 --- a/.zshrc +++ b/.zshrc @@ -1,3 +1,4 @@ +# shellcheck shell=bash # --- Oh My Zsh --- export ZSH="$HOME/.oh-my-zsh" export EDITOR="vim"