Skip to content

Commit 9ab4c2a

Browse files
committed
Merge #13496: Test: Harden lint-filenames.sh
927e115 Test: Harden lint-filenames.sh (wodry) Pull request description: - This fixes that only files with lower case file name suffix where found before, which contradicted the Regex to find uppercase characters in file names (including suffixes I guess). - `--full-name` switch was added to git ls-files, to define that the found file always includes it's full path in the git project. - since we know now that the file name includes the full path, we can harden the Regex to exclude the secp256k1 and univalue sub folders. - use backslash line break to make code easier to read and avoid too long line. Tree-SHA512: 9b55fe4965ae2084112b9f8a81bf9c657756c2cb5004986e7b6102a76adaf62c7d7a53257d9f13c5d8a1c75870b52c744d13830e3edd454a099e810357c914e5
2 parents 66e1a08 + 927e115 commit 9ab4c2a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/lint/lint-filenames.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
export LC_ALL=C
1111

1212
EXIT_CODE=0
13-
OUTPUT=$(git ls-files -- "*.cpp" "*.h" "*.py" "*.sh" | grep -vE '^[a-z0-9_./-]+$' | grep -vE 'src/(secp256k1|univalue)/')
13+
OUTPUT=$(git ls-files --full-name -- "*.[cC][pP][pP]" "*.[hH]" "*.[pP][yY]" "*.[sS][hH]" | \
14+
grep -vE '^[a-z0-9_./-]+$' | \
15+
grep -vE '^src/(secp256k1|univalue)/')
16+
1417
if [[ ${OUTPUT} != "" ]]; then
1518
echo "Use only lowercase alphanumerics (a-z0-9), underscores (_), hyphens (-) and dots (.)"
1619
echo "in source code filenames:"

0 commit comments

Comments
 (0)