Skip to content

Fix shellcheck warnings across all shell scripts #17

Description

@lroolle

Problem

Multiple shellcheck warnings found across shell scripts that should be addressed for better code quality:

claude.sh

  • SC2155: Declare and assign separately to avoid masking return values (5 instances)
  • SC2005: Useless echo with command substitution (4 instances)

claude-yolo

  • SC2155: Declare and assign separately to avoid masking return values (2 instances)
  • SC2206: Quote to prevent word splitting/globbing (1 instance)
  • SC2086: Double quote to prevent globbing and word splitting (2 instances)

claudeb.sh

  • SC2155: Declare and assign separately to avoid masking return values (1 instance)
  • SC2181: Check exit code directly instead of using $? (2 instances)

docker-entrypoint.sh

  • SC2012: Use find instead of ls for better filename handling (1 instance)
  • SC2155: Declare and assign separately to avoid masking return values (2 instances)
  • SC2178/SC2128: Array/string variable usage issues (6 instances)

Current Status

  • CI currently set to severity: error to avoid blocking builds
  • All scripts pass error-level checks
  • Warnings should be addressed for better code quality

Implementation Plan

  • Fix SC2155 warnings by separating declare and assign
  • Fix SC2005 warnings by removing unnecessary echo
  • Fix SC2086 warnings by adding proper quoting
  • Fix SC2181 warnings by direct exit code checking
  • Fix SC2178/SC2128 array handling issues
  • Update CI to severity: warning after fixes

Priority

Low - warnings don't break functionality but improve code quality

Labels

  • enhancement
  • code-quality
  • good first issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions