@@ -1373,7 +1373,7 @@ function check_sketch_structure() {
1373
1373
exitStatus=$( set_exit_status " $exitStatus " $(( ARDUINO_CI_SCRIPT_CHECK_SKETCH_STRUCTURE_CHECK_FOLDER_NAME_OFFSET + checkFolderNameExitStatus)) )
1374
1374
fi
1375
1375
1376
- done <<< " $(find " $normalizedSearchPath " -type f \( -iname '*.ino' -or -iname '*.pde' \) -printf '%h\n' | sort --unique)"
1376
+ done <<< " $(find " $normalizedSearchPath " -type f \( -iname '*.ino' -or -iname '*.pde' \) -printf '%h\n' | sort --dictionary-order -- unique)"
1377
1377
return " $exitStatus "
1378
1378
}
1379
1379
@@ -1471,7 +1471,7 @@ function check_library_structure() {
1471
1471
1472
1472
echo " ERROR: ${spuriousDotFolderPath} : Causes the Arduino IDE to display a spurious folder warning."
1473
1473
exitStatus=$( set_exit_status " $exitStatus " $ARDUINO_CI_SCRIPT_CHECK_LIBRARY_STRUCTURE_SPURIOUS_DOT_FOLDER_EXIT_STATUS )
1474
- done <<< " $(find " $normalizedLibraryPath " -maxdepth 1 -type d -regex '^.*/\..*$' -not -name '.git' -not -name '.github' -not -name '.svn' -not -name '.hg' -not -name '.bzr' -not -name '.vscode')"
1474
+ done <<< " $(find " $normalizedLibraryPath " -maxdepth 1 -type d -regex '^.*/\..*$' -not -name '.git' -not -name '.github' -not -name '.svn' -not -name '.hg' -not -name '.bzr' -not -name '.vscode' | sort --dictionary-order )"
1475
1475
1476
1476
# Check for incorrect spelling of extras folder
1477
1477
if [[ $( find " $normalizedLibraryPath " -maxdepth 1 -type d -and -iregex ' ^.*/extras?$' ) && ! $( find " $normalizedLibraryPath " -maxdepth 1 -type d -and -name ' extras' ) ]]; then
@@ -1507,7 +1507,7 @@ function check_library_structure() {
1507
1507
1508
1508
echo " ERROR: ${normalizedLibraryPropertiesPath} : Stray file. library.properties should be located in the library root folder."
1509
1509
exitStatus=$( set_exit_status " $exitStatus " $ARDUINO_CI_SCRIPT_CHECK_LIBRARY_STRUCTURE_STRAY_LIBRARY_PROPERTIES_EXIT_STATUS )
1510
- done <<< " $(find " $normalizedLibraryPath /src" -maxdepth 1 -type f -iname 'library.properties')"
1510
+ done <<< " $(find " $normalizedLibraryPath /src" -maxdepth 1 -type f -iname 'library.properties' | sort --dictionary-order )"
1511
1511
fi
1512
1512
1513
1513
# Check for missing keywords.txt file
@@ -1525,7 +1525,7 @@ function check_library_structure() {
1525
1525
1526
1526
echo " ERROR: ${keywordsTxtPath} : Stray file. keywords.txt should be located in the library root folder."
1527
1527
exitStatus=$( set_exit_status " $exitStatus " $ARDUINO_CI_SCRIPT_CHECK_LIBRARY_STRUCTURE_STRAY_KEYWORDS_TXT_EXIT_STATUS )
1528
- done <<< " $(find " $normalizedLibraryPath /src" -maxdepth 1 -type f -iname 'keywords.txt')"
1528
+ done <<< " $(find " $normalizedLibraryPath /src" -maxdepth 1 -type f -iname 'keywords.txt' | sort --dictionary-order )"
1529
1529
fi
1530
1530
1531
1531
# Check for sketch files outside of the src or extras folders
@@ -1550,7 +1550,7 @@ function check_library_structure() {
1550
1550
fi
1551
1551
fi
1552
1552
1553
- done <<< " $(find " $normalizedBasePath " -mindepth " $depth " -maxdepth " $depth " -type d)"
1553
+ done <<< " $(find " $normalizedBasePath " -mindepth " $depth " -maxdepth " $depth " -type d | sort --dictionary-order )"
1554
1554
1555
1555
return " $exitStatus "
1556
1556
}
@@ -1723,7 +1723,7 @@ function check_library_properties() {
1723
1723
echo " ERROR: ${foundLibraryPropertiesPath} : Incorrect filename case. This causes it to not be recognized on a filename case-sensitive OS such as Linux. It must be exactly \" library.properties\" ."
1724
1724
exitStatus=$( set_exit_status " $exitStatus " $ARDUINO_CI_SCRIPT_CHECK_LIBRARY_PROPERTIES_INCORRECT_FILENAME_CASE_EXIT_STATUS )
1725
1725
fi
1726
- done <<< " $(find " $normalizedLibraryPropertiesPath " -maxdepth 1 -type f -iname 'library.properties')"
1726
+ done <<< " $(find " $normalizedLibraryPropertiesPath " -maxdepth 1 -type f -iname 'library.properties' | sort --dictionary-order )"
1727
1727
1728
1728
# Check whether the folder contains a library.properties file
1729
1729
if [[ " $libraryPropertiesFound " == false ]]; then
@@ -2036,7 +2036,7 @@ function check_library_properties() {
2036
2036
exitStatus=$( set_exit_status " $exitStatus " $ARDUINO_CI_SCRIPT_CHECK_LIBRARY_PROPERTIES_LDFLAGS_MISSPELLED_EXIT_STATUS )
2037
2037
fi
2038
2038
2039
- done <<< " $(find " $normalizedLibraryPropertiesSearchPath " -maxdepth " $maximumSearchDepth " -type d)"
2039
+ done <<< " $(find " $normalizedLibraryPropertiesSearchPath " -maxdepth " $maximumSearchDepth " -type d | sort --dictionary-order )"
2040
2040
2041
2041
return " $exitStatus "
2042
2042
}
@@ -2121,7 +2121,7 @@ function check_keywords_txt() {
2121
2121
echo " ERROR: ${foundKeywordsTxtPath} : Incorrect filename case, which causes it to not be recognized on a filename case-sensitive OS such as Linux. It must be exactly \" keywords.txt\" ."
2122
2122
exitStatus=$( set_exit_status " $exitStatus " $ARDUINO_CI_SCRIPT_CHECK_KEYWORDS_TXT_INCORRECT_FILENAME_CASE_EXIT_STATUS )
2123
2123
fi
2124
- done <<< " $(find " $normalizedKeywordsTxtPath " -maxdepth 1 -type f -iname 'keywords.txt')"
2124
+ done <<< " $(find " $normalizedKeywordsTxtPath " -maxdepth 1 -type f -iname 'keywords.txt' | sort --dictionary-order )"
2125
2125
2126
2126
# Check whether the folder contains a keywords.txt file
2127
2127
if [[ " $keywordsTxtFound " == false ]]; then
@@ -2301,7 +2301,7 @@ function check_keywords_txt() {
2301
2301
done <<< " $keywordsTxtCRline"
2302
2302
done < " ${normalizedKeywordsTxtPath} /keywords.txt"
2303
2303
2304
- done <<< " $(find " $normalizedKeywordsTxtSearchPath " -maxdepth " $maximumSearchDepth " -type d)"
2304
+ done <<< " $(find " $normalizedKeywordsTxtSearchPath " -maxdepth " $maximumSearchDepth " -type d | sort --dictionary-order )"
2305
2305
2306
2306
return " $exitStatus "
2307
2307
}
0 commit comments