Skip to content

Commit c73b5eb

Browse files
committed
check_folder_name: Don't say "ERROR" in the output
check_library_properties uses check_folder_name, but only to display warnings. Thus, the use of "ERROR" in the check_folder_name output resulted in incorrect output from check_library_properties.
1 parent 8311df7 commit c73b5eb

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ matrix:
8282
- cd ..
8383
- git clone https://github.com/per1234/arduino-ci-script-tests
8484
- cd arduino-ci-script-tests
85-
- git checkout 573daca37f80a720b9e097de21ddc7d69c0b46f4
85+
- git checkout d9c33763ccde4467f43e1a5ddb8632e0575e6c3e
8686
script:
8787
- bats check_keywords_txt.bats
8888
- bats check_library_manager_compliance.bats

arduino-ci-script.sh

+5-3
Original file line numberDiff line numberDiff line change
@@ -1232,20 +1232,20 @@ function check_folder_name() {
12321232
# Starting folder name with a - or . is not allowed
12331233
local -r startsWithInvalidCharacterRegex="^[-.]"
12341234
if [[ "$folderName" =~ $startsWithInvalidCharacterRegex ]]; then
1235-
echo "ERROR: Invalid folder name: ${folderName}. Folder name beginning with a - or . is not allowed."
1235+
echo "Invalid folder name: ${folderName}. Folder name beginning with a - or . is not allowed."
12361236
exitStatus=$(set_exit_status "$exitStatus" $ARDUINO_CI_SCRIPT_CHECK_FOLDER_NAME_INVALID_FIRST_CHARACTER_EXIT_STATUS)
12371237
fi
12381238

12391239
# Allowed characters: a-z, A-Z, 0-1, -._
12401240
local -r disallowedCharactersRegex="[^a-zA-Z0-9._-]"
12411241
if [[ "$folderName" =~ $disallowedCharactersRegex ]]; then
1242-
echo "ERROR: Invalid folder name: ${folderName}. Only letters, numbers, dots, dashes, and underscores are allowed."
1242+
echo "Invalid folder name: ${folderName}. Only letters, numbers, dots, dashes, and underscores are allowed."
12431243
exitStatus=$(set_exit_status "$exitStatus" $ARDUINO_CI_SCRIPT_CHECK_FOLDER_NAME_INVALID_CHARACTER_EXIT_STATUS)
12441244
fi
12451245

12461246
# <64 characters
12471247
if [[ ${#folderName} -gt 63 ]]; then
1248-
echo "ERROR: Folder name $folderName exceeds the maximum of 63 characters."
1248+
echo "Folder name $folderName exceeds the maximum of 63 characters."
12491249
exitStatus=$(set_exit_status "$exitStatus" $ARDUINO_CI_SCRIPT_CHECK_FOLDER_NAME_TOO_LONG_EXIT_STATUS)
12501250
fi
12511251
return "$exitStatus"
@@ -1347,6 +1347,7 @@ function check_sketch_structure() {
13471347
check_folder_name "$sketchPath"
13481348
local checkFolderNameExitStatus=$?
13491349
if [[ $checkFolderNameExitStatus -ne $ARDUINO_CI_SCRIPT_SUCCESS_EXIT_STATUS ]]; then
1350+
echo "ERROR: ${sketchPath}: Invalid folder name."
13501351
exitStatus=$(set_exit_status "$exitStatus" $((ARDUINO_CI_SCRIPT_CHECK_SKETCH_STRUCTURE_CHECK_FOLDER_NAME_OFFSET + checkFolderNameExitStatus)))
13511352
fi
13521353

@@ -1435,6 +1436,7 @@ function check_library_structure() {
14351436
check_folder_name "$normalizedLibraryPath"
14361437
local checkFolderNameExitStatus=$?
14371438
if [[ $checkFolderNameExitStatus -ne $ARDUINO_CI_SCRIPT_SUCCESS_EXIT_STATUS ]]; then
1439+
echo "ERROR: ${normalizedLibraryPath}: Invalid folder name."
14381440
exitStatus=$(set_exit_status "$exitStatus" $((ARDUINO_CI_SCRIPT_CHECK_LIBRARY_STRUCTURE_CHECK_FOLDER_NAME_OFFSET + checkFolderNameExitStatus)))
14391441
fi
14401442

0 commit comments

Comments
 (0)