Import the latest version upstream
This commit is contained in:
parent
d5b581bbfb
commit
bee0553fda
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#$Id$
|
#$Id$
|
||||||
#Copyright (c) 2016-2018 Pierre Pronchery <khorben@defora.org>
|
#Copyright (c) 2016-2019 Pierre Pronchery <khorben@defora.org>
|
||||||
#
|
#
|
||||||
#Redistribution and use in source and binary forms, with or without
|
#Redistribution and use in source and binary forms, with or without
|
||||||
#modification, are permitted provided that the following conditions are met:
|
#modification, are permitted provided that the following conditions are met:
|
||||||
|
@ -63,16 +63,25 @@ _clint()
|
||||||
for filename in $($FIND "../$subdir" -type f | $SORT); do
|
for filename in $($FIND "../$subdir" -type f | $SORT); do
|
||||||
case "$filename" in
|
case "$filename" in
|
||||||
*.c)
|
*.c)
|
||||||
(_clint_lint "$filename" ||
|
echo
|
||||||
|
(_clint_lint "$filename";
|
||||||
_clint_rtrim "$filename")
|
_clint_rtrim "$filename")
|
||||||
;;
|
;;
|
||||||
*.h)
|
*.h)
|
||||||
|
echo
|
||||||
|
echo "$filename:"
|
||||||
(_clint_rtrim "$filename")
|
(_clint_rtrim "$filename")
|
||||||
;;
|
;;
|
||||||
|
*)
|
||||||
|
continue
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "FAIL"
|
||||||
echo "$PROGNAME: $filename: FAIL" 1>&2
|
echo "$PROGNAME: $filename: FAIL" 1>&2
|
||||||
ret=2
|
ret=2
|
||||||
|
else
|
||||||
|
echo "OK"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
@ -83,15 +92,8 @@ _clint_lint()
|
||||||
{
|
{
|
||||||
filename="$1"
|
filename="$1"
|
||||||
|
|
||||||
echo
|
echo -n "${filename%/*}/"
|
||||||
$DEBUG $LINT $CPPFLAGS $CFLAGS "$filename" 2>&1
|
$DEBUG $LINT $CPPFLAGS $CFLAGS "$filename" 2>&1
|
||||||
ret=$?
|
|
||||||
if [ $ret -eq 0 ]; then
|
|
||||||
echo "OK"
|
|
||||||
else
|
|
||||||
echo "FAIL"
|
|
||||||
fi
|
|
||||||
return $ret
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_clint_rtrim()
|
_clint_rtrim()
|
||||||
|
@ -99,15 +101,7 @@ _clint_rtrim()
|
||||||
filename="$1"
|
filename="$1"
|
||||||
regex="[ ]\\+\$"
|
regex="[ ]\\+\$"
|
||||||
|
|
||||||
echo
|
|
||||||
$DEBUG $GREP -vq "$regex" "$filename" 2>&1
|
$DEBUG $GREP -vq "$regex" "$filename" 2>&1
|
||||||
ret=$?
|
|
||||||
if [ $ret -eq 0 ]; then
|
|
||||||
echo "OK"
|
|
||||||
else
|
|
||||||
echo "FAIL"
|
|
||||||
fi
|
|
||||||
return $ret
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user