Skip to content

Commit ccc2afd

Browse files
committed
fix: resolve all shellcheck warnings
- SC1091: add disable directives before source "$SCRIPT_DIR/lib.sh" in all scripts (path uses variable, shellcheck can't resolve statically) - SC2034: OS and ARCH are set in lib.sh and used by sourcing scripts; suppress false-positive unused-variable warnings - SC2005: replace echo "$(uname -m)" with plain uname -m - SC2016: suppress single-quote $SHELL warning in intentional literal printf https://claude.ai/code/session_01KVdk4CmanaQvKXrk3inMoV
1 parent 5550e06 commit ccc2afd

8 files changed

Lines changed: 11 additions & 1 deletion

File tree

setup/homeshick.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env bash
22
# Install homeshick and clone dotfiles
33
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
4+
# shellcheck disable=SC1091
45
source "$SCRIPT_DIR/lib.sh"
56

67
REPOS="$HOME/.homesick/repos"

setup/lib.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@ detect_arch() {
2222
case "$(uname -m)" in
2323
x86_64 | amd64) echo "x86_64" ;;
2424
aarch64 | arm64) echo "aarch64" ;;
25-
*) echo "$(uname -m)" ;;
25+
*) uname -m ;;
2626
esac
2727
}
2828

29+
# shellcheck disable=SC2034
2930
OS="$(detect_os)"
31+
# shellcheck disable=SC2034
3032
ARCH="$(detect_arch)"
3133

3234
# -- Output helpers --

setup/neovim.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env bash
22
# Install latest stable Neovim
33
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
4+
# shellcheck disable=SC1091
45
source "$SCRIPT_DIR/lib.sh"
56

67
ensure_bin_dir

setup/node.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env bash
22
# Install nvm and Node.js
33
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
4+
# shellcheck disable=SC1091
45
source "$SCRIPT_DIR/lib.sh"
56

67
NODE_VERSION="${NODE_VERSION:-22}"

setup/packages.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env bash
22
# Install base packages via apt or brew
33
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
4+
# shellcheck disable=SC1091
45
source "$SCRIPT_DIR/lib.sh"
56

67
COMMON_PACKAGES=(

setup/setup.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
set -euo pipefail
44

55
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
6+
# shellcheck disable=SC1091
67
source "$SCRIPT_DIR/lib.sh"
78

89
printf '\n \033[1mdotfiles setup\033[0m (%s / %s)\n\n' "$OS" "$ARCH"
@@ -21,4 +22,5 @@ run_step "CLI tools" tools.sh
2122
run_step "Homeshick" homeshick.sh
2223

2324
printf '\n \033[1;32m✓ Setup complete.\033[0m\n'
25+
# shellcheck disable=SC2016
2426
printf ' Restart your shell or run: exec $SHELL\n\n'

setup/tools.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env bash
22
# Install standalone binary tools (starship, shfmt)
33
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
4+
# shellcheck disable=SC1091
45
source "$SCRIPT_DIR/lib.sh"
56

67
ensure_bin_dir

setup/uv.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env bash
22
# Install uv (Python package manager) and a current stable Python
33
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
4+
# shellcheck disable=SC1091
45
source "$SCRIPT_DIR/lib.sh"
56

67
PYTHON_VERSION="${PYTHON_VERSION:-3.13}"

0 commit comments

Comments
 (0)