Skip to content

Commit

Permalink
shellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
francescobianco committed Jun 26, 2024
1 parent 4563f73 commit cd93ac9
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions tests/fixtures/basic-app/src/.shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
disable=SC2148
1 change: 1 addition & 0 deletions tests/fixtures/basic-lib/src/.shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
disable=SC2148
1 change: 1 addition & 0 deletions tests/fixtures/complex-app/src/.shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
disable=SC2148
1 change: 1 addition & 0 deletions tests/fixtures/empty-app/src/.shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
disable=SC2148
1 change: 1 addition & 0 deletions tests/fixtures/error-app/src/.shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
disable=SC2148,SC1009,SC1035,SC1073,SC1072
1 change: 1 addition & 0 deletions tests/fixtures/single-dep-app/src/.shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
disable=SC2148
1 change: 1 addition & 0 deletions tests/fixtures/zsh-app/src/.shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
disable=SC2148
10 changes: 7 additions & 3 deletions tests/fixtures/zsh-app/src/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ function do_something() {

# A function to handle any caught exceptions
function error_handler() {
local exception="$1" message="${(@)@:2}"
local exception
local message

echo $exception # RainbowException
echo $message # Unicorns!
exception="$1"
message="${(@)@:2}"

echo "$exception" # RainbowException
echo "$message" # Unicorns!
}

main() {
Expand Down

0 comments on commit cd93ac9

Please sign in to comment.