Skip to content

Commit

Permalink
feat: shellcheck Docker scripts, fix warnings
Browse files Browse the repository at this point in the history
* Warnings were:
In Docker/start_server.sh line 4:
declare -r application_configs="$(ls -d /etc/config/* 2>/dev/null | paste -sd ',' -)"
           ^-----------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.
                                  ^-----------------------------^ SC2012 (info): Use find instead of ls to better handle non-alphanumeric filenames.
  • Loading branch information
swalchemist committed Jan 13, 2024
1 parent 3abf2d6 commit 0137a62
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docker/start_server.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash
set -euo pipefail

declare -r application_configs="$(ls -d /etc/config/* 2>/dev/null | paste -sd ',' -)"
application_configs="$(find /tmp/config -mindepth 1 -maxdepth 1 2>/dev/null | paste -sd ',' -)"
declare -r application_configs

"java" \
"-Djava.security.egd=file:/dev/urandom" \
Expand Down
2 changes: 1 addition & 1 deletion scripts/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function go_to_project_root_directory() {
}

function lint_scripts() {
shellcheck scripts/*.sh
shellcheck -- */*.sh
}

function lint_jvm_language_code() {
Expand Down

0 comments on commit 0137a62

Please sign in to comment.