Skip to content

Commit 9c5607b

Browse files
committed
Avoid fallback behavior regarding escaped non-special characters
https://github.com/koalaman/shellcheck/wiki/SC1117
1 parent c4e2a52 commit 9c5607b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

arduino-ci-script.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ readonly ARDUINO_CI_SCRIPT_FULL_IDE_VERSION_LIST_ARRAY="${ARDUINO_CI_SCRIPT_IDE_
1717
readonly ARDUINO_CI_SCRIPT_TEMPORARY_FOLDER="${HOME}/temporary/arduino-ci-script"
1818
readonly ARDUINO_CI_SCRIPT_IDE_INSTALLATION_FOLDER="arduino"
1919
readonly ARDUINO_CI_SCRIPT_VERIFICATION_OUTPUT_FILENAME="${ARDUINO_CI_SCRIPT_TEMPORARY_FOLDER}/verification_output.txt"
20-
readonly ARDUINO_CI_SCRIPT_REPORT_FILENAME="travis_ci_job_report_$(printf "%05d\n" "${TRAVIS_BUILD_NUMBER}").$(printf "%03d\n" "$(echo "$TRAVIS_JOB_NUMBER" | cut -d'.' -f 2)").tsv"
20+
readonly ARDUINO_CI_SCRIPT_REPORT_FILENAME="travis_ci_job_report_$(printf '%05d\n' "${TRAVIS_BUILD_NUMBER}").$(printf '%03d\n' "$(echo "$TRAVIS_JOB_NUMBER" | cut -d'.' -f 2)").tsv"
2121
readonly ARDUINO_CI_SCRIPT_REPORT_FOLDER="${HOME}/arduino-ci-script_report"
2222
readonly ARDUINO_CI_SCRIPT_REPORT_FILE_PATH="${ARDUINO_CI_SCRIPT_REPORT_FOLDER}/${ARDUINO_CI_SCRIPT_REPORT_FILENAME}"
2323
# The arduino manpage(https://github.com/arduino/Arduino/blob/master/build/shared/manpage.adoc#exit-status) documents a range of exit statuses. These exit statuses indicate success, invalid arduino command, or compilation failed due to legitimate code errors. arduino sometimes returns other exit statuses that may indicate problems that may go away after a retry.
@@ -308,7 +308,7 @@ function generate_ide_version_list_array()
308308

309309
else
310310
local rawIDElist
311-
local -r IDEversionListRegex="\("
311+
local -r IDEversionListRegex='\('
312312
if [[ "$startIDEversion" =~ $IDEversionListRegex ]]; then
313313
# IDE versions list was supplied
314314
# Convert it to a temporary array
@@ -994,14 +994,14 @@ function display_report()
994994
enable_verbosity
995995

996996
if [ -e "$ARDUINO_CI_SCRIPT_REPORT_FILE_PATH" ]; then
997-
echo -e "\n\n\n**************Begin Report**************\n\n\n"
997+
echo -e '\n\n\n**************Begin Report**************\n\n\n'
998998
cat "$ARDUINO_CI_SCRIPT_REPORT_FILE_PATH"
999-
echo -e "\n\n"
999+
echo -e '\n\n'
10001000
echo "Total failed sketch builds: $ARDUINO_CI_SCRIPT_TOTAL_SKETCH_BUILD_FAILURE_COUNT"
10011001
echo "Total warnings: $ARDUINO_CI_SCRIPT_TOTAL_WARNING_COUNT"
10021002
echo "Total board issues: $ARDUINO_CI_SCRIPT_TOTAL_BOARD_ISSUE_COUNT"
10031003
echo "Total library issues: $ARDUINO_CI_SCRIPT_TOTAL_LIBRARY_ISSUE_COUNT"
1004-
echo -e "\n\n"
1004+
echo -e '\n\n'
10051005
else
10061006
echo "No report file available for this job"
10071007
fi
@@ -1055,7 +1055,7 @@ function publish_report_to_repository()
10551055
if [[ "$gitPushExitStatus" == "$ARDUINO_CI_SCRIPT_SUCCESS_EXIT_STATUS" ]]; then
10561056
if [[ "$doLinkComment" == "true" ]]; then
10571057
# Only comment if it's job 1
1058-
local -r firstJobRegex="\.1$"
1058+
local -r firstJobRegex='\.1$'
10591059
if [[ "$TRAVIS_JOB_NUMBER" =~ $firstJobRegex ]]; then
10601060
local reportURL
10611061
reportURL="${repositoryURL%.*}/tree/${reportBranch}/${reportFolder}"
@@ -1118,7 +1118,7 @@ curlDataHere
11181118

11191119
if [[ "$doLinkComment" == "true" ]]; then
11201120
# Only comment if it's job 1
1121-
local -r firstJobRegex="\.1$"
1121+
local -r firstJobRegex='\.1$'
11221122
if [[ "$TRAVIS_JOB_NUMBER" =~ $firstJobRegex ]]; then
11231123
local reportURL="${gistURL}#file-${ARDUINO_CI_SCRIPT_REPORT_FILENAME//./-}"
11241124
comment_report_link "$token" "$reportURL"

0 commit comments

Comments
 (0)