FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 10-30-2008, 08:46 AM
Hans de Goede
 
Default PATCH: Add --strict option to runpychecker.sh

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 '
' '|'`" > pychecker-log

--
1.6.0.3

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 10-30-2008, 01:55 PM
Jeremy Katz
 
Default PATCH: Add --strict option to runpychecker.sh

Also looks good. I think this is probably the best way to get a good
compromise; we can look at the warnings that are possibly interesting
but not have them failing the build

Jeremy

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 07:10 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org