| @@ -3,12 +3,16 @@ | |||||
| # | # | ||||
| # Check for Doxygen warnings | # Check for Doxygen warnings | ||||
| # | # | ||||
| if warnings="$(grep -c Warning: ../doc/doxygen.log 2>/dev/null)"; then | |||||
| echo "error: $warnings warnings in Doxygen generation:" | |||||
| nfiles="$(grep -c "Parsing file" < ../doc/doxygen.log)" | |||||
| if nfails="$(grep -c Warning: ../doc/doxygen.log 2>/dev/null)"; then | |||||
| grep Warning: ../doc/doxygen.log | sed 's/\(.\{75\}\)...*/\1 .../' | grep Warning: ../doc/doxygen.log | sed 's/\(.\{75\}\)...*/\1 .../' | ||||
| fi | |||||
| echo "$nfiles files, $nfails visible errors in documentation" | |||||
| if test "$nfails" != "0"; then | |||||
| exit 1 | exit 1 | ||||
| fi | fi | ||||
| echo "0 visible errors in documentation" | |||||
| exit 0 | exit 0 | ||||
| @@ -3,30 +3,36 @@ | |||||
| # | # | ||||
| # Check that we have no tabs or trailing spaces in the source code | # Check that we have no tabs or trailing spaces in the source code | ||||
| # | # | ||||
| failure=0 | |||||
| nfails=0 | |||||
| nfiles=0 | |||||
| nlines=0 | |||||
| for dir in caca kernel src cxx examples ruby tools; do | for dir in caca kernel src cxx examples ruby tools; do | ||||
| pushd ../$dir >/dev/null | pushd ../$dir >/dev/null | ||||
| for x in $(make -s echo-sources); do | for x in $(make -s echo-sources); do | ||||
| case "$x" in | case "$x" in | ||||
| *.c|*.cpp|*.h|*.m) ;; | |||||
| *) continue ;; | |||||
| *.c|*.cpp|*.h|*.m) | |||||
| nfiles=$(($nfiles + 1)); | |||||
| nlines=$(($nlines + `wc -l < "$x"`)) ;; | |||||
| *) | |||||
| continue ;; | |||||
| esac | esac | ||||
| if grep '[[:space:]]$' "$x" >/dev/null 2>&1; then | if grep '[[:space:]]$' "$x" >/dev/null 2>&1; then | ||||
| echo "error: $dir/$x contains trailing spaces" | echo "error: $dir/$x contains trailing spaces" | ||||
| failure=1 | |||||
| nfails=$(($nfails + 1)) | |||||
| fi | fi | ||||
| if grep ' ' "$x" >/dev/null 2>&1; then | if grep ' ' "$x" >/dev/null 2>&1; then | ||||
| echo "error: $dir/$x contains tabs" | echo "error: $dir/$x contains tabs" | ||||
| failure=1 | |||||
| nfails=$(($nfails + 1)) | |||||
| fi | fi | ||||
| done | done | ||||
| popd >/dev/null | popd >/dev/null | ||||
| done | done | ||||
| if test "$failure" != "0"; then | |||||
| echo "$nfiles files, $nlines lines, $nfails errors in source code" | |||||
| if test "$nfails" != "0"; then | |||||
| exit 1 | exit 1 | ||||
| fi | fi | ||||
| echo "0 errors in source code" | |||||
| exit 0 | exit 0 | ||||
| @@ -9,19 +9,22 @@ ret=0 | |||||
| config_h_in=$(dirname "$0")/../config.h.in | config_h_in=$(dirname "$0")/../config.h.in | ||||
| win32_config_h=$(dirname "$0")/../win32/config.h | win32_config_h=$(dirname "$0")/../win32/config.h | ||||
| failure=0 | |||||
| nfails=0 | |||||
| ntokens=0 | |||||
| for key in $(sed -ne 's/.*#undef *\([A-Za-z0-9_]*\).*/\1/p' "$config_h_in"); | for key in $(sed -ne 's/.*#undef *\([A-Za-z0-9_]*\).*/\1/p' "$config_h_in"); | ||||
| do | do | ||||
| ntokens=$(($ntokens + 1)) | |||||
| if ! grep '[ef] \<'"$key"'\>' "$win32_config_h" >/dev/null 2>&1; then | if ! grep '[ef] \<'"$key"'\>' "$win32_config_h" >/dev/null 2>&1; then | ||||
| echo "error: $key missing from win32/config.h" | echo "error: $key missing from win32/config.h" | ||||
| failure=1 | |||||
| nfails=$(($nfails + 1)) | |||||
| fi | fi | ||||
| done | done | ||||
| if test "$failure" != "0"; then | |||||
| echo "$ntokens tokens, $nfails errors in Win32 config.h" | |||||
| if test "$nfails" != "0"; then | |||||
| exit 1 | exit 1 | ||||
| fi | fi | ||||
| echo "0 errors in Win32 config.h" | |||||
| exit 0 | exit 0 | ||||