[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
PATCH: Add --strict option to runpychecker.sh
- From: Hans de Goede <hdegoede redhat com>
- To: Discussion of Development and Customization of the Red Hat Linux Installer <anaconda-devel-list redhat com>
- Subject: PATCH: Add --strict option to runpychecker.sh
- Date: Thu, 30 Oct 2008 10:46:54 +0100
Hi All,
See attachment.
Regards,
Hans
>From 68a074541450912f3fd58c3d4d6144f719a87f6a Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede redhat com>
Date: Thu, 30 Oct 2008 10:35:42 +0100
Subject: [PATCH] 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!
---
runpychecker.sh | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
diff --git a/runpychecker.sh b/runpychecker.sh
index 8a72474..08be9d8 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
--
1.6.0.3
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]