File: run-pychecker

package info (click to toggle)
germinate 2.26
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 424 kB
  • ctags: 381
  • sloc: python: 3,794; perl: 47; makefile: 33; sh: 15
file content (19 lines) | stat: -rwxr-xr-x 436 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#! /bin/sh
set -e

if ! which pychecker >/dev/null 2>&1; then
	echo "pychecker not installed, so not running it" >&2
	exit 0
fi

cleanup () {
	find germinate -name tests -prune -o -type f \( -name \*.pyc -o -name \*.pyo \) -print0 | xargs -0r rm -f
}
trap cleanup EXIT HUP INT QUIT TERM

ret=0
for x in $(find germinate -name tests -prune -o -name \*.py -printf '%p\n' | sort); do
	pychecker "$x" | grep "^$x:" && ret=1
done

exit $ret