mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-26 17:52:13 +01:00
Merge #13496: Test: Harden lint-filenames.sh
927e1150bc207181f7d5b0948e87d04b737a1c27 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
This commit is contained in:
commit
9ab4c2a246
@ -10,7 +10,10 @@
|
||||
export LC_ALL=C
|
||||
|
||||
EXIT_CODE=0
|
||||
OUTPUT=$(git ls-files -- "*.cpp" "*.h" "*.py" "*.sh" | grep -vE '^[a-z0-9_./-]+$' | grep -vE 'src/(secp256k1|univalue)/')
|
||||
OUTPUT=$(git ls-files --full-name -- "*.[cC][pP][pP]" "*.[hH]" "*.[pP][yY]" "*.[sS][hH]" | \
|
||||
grep -vE '^[a-z0-9_./-]+$' | \
|
||||
grep -vE '^src/(secp256k1|univalue)/')
|
||||
|
||||
if [[ ${OUTPUT} != "" ]]; then
|
||||
echo "Use only lowercase alphanumerics (a-z0-9), underscores (_), hyphens (-) and dots (.)"
|
||||
echo "in source code filenames:"
|
||||
|
Loading…
x
Reference in New Issue
Block a user