Merge #13496: Test: Harden lint-filenames.sh
927e1150bc
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
1 changed files with 4 additions and 1 deletions
|
@ -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…
Reference in a new issue