Test files not directories

This commit is contained in:
Pierre Pronchery 2017-11-08 08:03:46 +01:00
parent 578f828136
commit a92f4d350e
6 changed files with 6 additions and 6 deletions

View File

@ -59,7 +59,7 @@ _clint()
done < "$PROJECTCONF"
for subdir in $subdirs; do
[ -d "../$subdir" ] || continue
for filename in $($FIND "../$subdir" -name '*.c' | $SORT); do
for filename in $($FIND "../$subdir" -type f -a -name '*.c' | $SORT); do
_clint_file "$filename"
if [ $? -eq 0 ]; then
echo "$filename:"

View File

@ -58,7 +58,7 @@ _htmllint()
done < "$PROJECTCONF"
for subdir in $subdirs; do
[ -d "../$subdir" ] || continue
for filename in $($FIND "../$subdir" -iname '*.html' -o -iname '*.htm' | $SORT); do
for filename in $($FIND "../$subdir" -type f -a \( -iname '*.html' -o -iname '*.htm' \) | $SORT); do
$DEBUG $HTMLLINT "$filename" 2>&1 > "$DEVNULL"
if [ $? -eq 0 ]; then
echo "$filename:"

View File

@ -58,7 +58,7 @@ _phplint()
done < "$PROJECTCONF"
for subdir in $subdirs; do
[ -d "../$subdir" ] || continue
for filename in $($FIND "../$subdir" -name '*.php' | $SORT); do
for filename in $($FIND "../$subdir" -type f -a -name '*.php' | $SORT); do
echo "$filename:"
$DEBUG $PHPLINT -f "$filename" 2>&1
if [ $? -ne 0 ]; then

View File

@ -56,7 +56,7 @@ _pylint()
done < "$PROJECTCONF"
for subdir in $subdirs; do
[ -d "../$subdir" ] || continue
for filename in $($FIND "../$subdir" -name '*.py' | $SORT); do
for filename in $($FIND "../$subdir" -type f -a -name '*.py' | $SORT); do
echo
echo "Testing: $filename"
$DEBUG $PYLINT -- "$filename" 2>&1

View File

@ -58,7 +58,7 @@ _shlint()
done < "$PROJECTCONF"
for subdir in $subdirs; do
[ -d "../$subdir" ] || continue
for filename in $($FIND "../$subdir" -name '*.sh' | $SORT); do
for filename in $($FIND "../$subdir" -type f -a -name '*.sh' | $SORT); do
_shlint_file "$filename"
if [ $? -eq 0 ]; then
echo "$filename:"

View File

@ -58,7 +58,7 @@ _xmllint()
done < "$PROJECTCONF"
for subdir in $subdirs; do
[ -d "../$subdir" ] || continue
for filename in $($FIND "../$subdir" -name '*.xml' -o -name '*.xsl' | $SORT); do
for filename in $($FIND "../$subdir" -type f -a \( -name '*.xml' -o -name '*.xsl' \) | $SORT); do
$DEBUG $XMLLINT "$filename" 2>&1 > "$DEVNULL"
if [ $? -eq 0 ]; then
echo "$filename:"