minor documentation for unicode_lint
This commit is contained in:
parent
1a6e81310e
commit
57ed27f46e
@ -5,9 +5,11 @@
|
||||
#
|
||||
# See https://github.com/lz4/lz4/issues/1018
|
||||
|
||||
echo "Ensure no unicode character is present in source files *.{c,h}"
|
||||
pass=true
|
||||
|
||||
# Scan ./lib/ for Unicode in source (*.c, *.h) files
|
||||
echo "Scanning lib/"
|
||||
result=$(
|
||||
find ./lib/ -regex '.*\.\(c\|h\)$' -exec grep -P -n "[^\x00-\x7F]" {} \; -exec echo "{}: FAIL" \;
|
||||
)
|
||||
@ -16,16 +18,8 @@ if [[ $result ]]; then
|
||||
pass=false
|
||||
fi
|
||||
|
||||
# Scan ./tests/ for Unicode in source (*.c, *.h) files
|
||||
result=$(
|
||||
find ./tests/ -regex '.*\.\(c\|h\)$' -exec grep -P -n "[^\x00-\x7F]" {} \; -exec echo "{}: FAIL" \;
|
||||
)
|
||||
if [[ $result ]]; then
|
||||
echo "$result"
|
||||
pass=false
|
||||
fi
|
||||
|
||||
# Scan ./programs/ for Unicode in source (*.c, *.h) files
|
||||
echo "Scanning programs/"
|
||||
result=$(
|
||||
find ./programs/ -regex '.*\.\(c\|h\)$' -exec grep -P -n "[^\x00-\x7F]" {} \; -exec echo "{}: FAIL" \;
|
||||
)
|
||||
@ -34,8 +28,18 @@ if [[ $result ]]; then
|
||||
pass=false
|
||||
fi
|
||||
|
||||
# Scan ./tests/ for Unicode in source (*.c, *.h) files
|
||||
echo "Scanning tests/"
|
||||
result=$(
|
||||
find ./tests/ -regex '.*\.\(c\|h\)$' -exec grep -P -n "[^\x00-\x7F]" {} \; -exec echo "{}: FAIL" \;
|
||||
)
|
||||
if [[ $result ]]; then
|
||||
echo "$result"
|
||||
pass=false
|
||||
fi
|
||||
|
||||
if [ "$pass" = true ]; then
|
||||
echo "All tests successful."
|
||||
echo "All tests successful: no unicode character detected"
|
||||
echo "Result: PASS"
|
||||
exit 0
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user