summaryrefslogtreecommitdiffstats
path: root/runpychecker.sh
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2008-10-30 10:35:42 +0100
committerHans de Goede <hdegoede@redhat.com>2008-10-30 10:35:42 +0100
commit68a074541450912f3fd58c3d4d6144f719a87f6a (patch)
treefda7249a45adb6be670da039fc73ad34a1fac4b0 /runpychecker.sh
parentdde11e88a5051709e797d18e641db2caca8ad85d (diff)
downloadanaconda-68a074541450912f3fd58c3d4d6144f719a87f6a.tar.gz
anaconda-68a074541450912f3fd58c3d4d6144f719a87f6a.tar.xz
anaconda-68a074541450912f3fd58c3d4d6144f719a87f6a.zip
Add --strict option to runpychecker.sh
Add --strict option to runpychecker.sh, and relax the default checking a bit now we are down to 0 warnings!
Diffstat (limited to 'runpychecker.sh')
-rwxr-xr-xrunpychecker.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/runpychecker.sh b/runpychecker.sh
index 8a7247458..08be9d862 100755
--- a/runpychecker.sh
+++ b/runpychecker.sh
@@ -9,6 +9,27 @@
# warnings are found it exits with a status of 0
FALSE_POSITIVES=pychecker-false-positives
+NON_STRICT_OPTIONS="--no-deprecated --no-returnvalues --no-abstract"
+
+usage () {
+ echo "usage: `basename $0` [--strict] [--help]"
+ exit $1
+}
+
+while [ $# -gt 0 ]; do
+ case $1 in
+ --strict)
+ NON_STRICT_OPTIONS=""
+ ;;
+ --help)
+ usage 0
+ ;;
+ *)
+ echo "Error unknown option: $1"
+ usage 1
+ esac
+ shift
+done
if [ "`tail -c 1 pychecker-false-positives`" == "`echo`" ]; then
echo "Error $FALSE_POSITIVES ends with an enter."
@@ -23,6 +44,7 @@ pychecker --only --limit 1000 \
--no-callinit --no-local --no-shadow --no-shadowbuiltin \
--no-import --no-miximport --no-pkgimport --no-reimport \
--no-argsused --no-varargsused --no-override \
+ $NON_STRICT_OPTIONS \
anaconda anaconda *.py textw/*.py iw/*.py installclasses/*.py isys/*.py | \
egrep -v "`cat $FALSE_POSITIVES | tr '\n' '|'`" > pychecker-log