Disable some messages in pylintrc and disable cyclic imports check in silent mode of do_pylint.sh.
authorPawel Solyga <Pawel.Solyga@gmail.com>
Fri, 03 Apr 2009 17:27:31 +0000
changeset 2071 0aa24d8655ac
parent 2070 9555be8634a3
child 2072 eb4565a8e5b4
Disable some messages in pylintrc and disable cyclic imports check in silent mode of do_pylint.sh. Patch by: Pawel Solyga Reviewed by: to-be-reviewed
scripts/pylint/do_pylint.sh
scripts/pylint/pylintrc
--- a/scripts/pylint/do_pylint.sh	Fri Apr 03 17:23:53 2009 +0000
+++ b/scripts/pylint/do_pylint.sh	Fri Apr 03 17:27:31 2009 +0000
@@ -17,6 +17,7 @@
 # To disable some of the checks use options listed below:
 # disable unused imports: --disable-msg=W0611
 # disable TODO: --disable-msg=W0511
+# disable cyclic imports: --disable-msg=R0401
 # disable report: --reports=no
 # disable similarity check: --disable-checker=similarities
 #
@@ -27,7 +28,7 @@
 ARGS=( "$@" )
 
 if [ "$1" == "--silent" ]; then
-  SILENT_ARGS="--disable-msg=W0611 --disable-msg=W0511 --reports=no --disable-checker=similarities"
+  SILENT_ARGS="--disable-msg=W0511,R0401 --reports=no --disable-checker=similarities"
   ARGS[0]=""
 fi
 
--- a/scripts/pylint/pylintrc	Fri Apr 03 17:23:53 2009 +0000
+++ b/scripts/pylint/pylintrc	Fri Apr 03 17:27:31 2009 +0000
@@ -66,7 +66,21 @@
 # R0801: Similar lines in %s files. Indicates that a set of similar lines has been detected 
 #        among multiple file. This usually means that the code should be refactored to avoid this
 #        duplication.
-disable-msg=W0613,W0622,W0232,W0142,W0102,W0212,R0201,R0801
+# E1103: %s %r has no %r member (but some types could not be inferred) Used when a variable is 
+#        accessed for an unexistant member, but astng was not able to interpret all possible 
+#        types of this variable.
+# E1101: %s %r has no %r member Used when a variable is accessed for an unexistant member.
+# C0302: Too many lines in module (%s) Used when a module has too much lines, reducing 
+#        its readibility.
+# W0602: Using global for %r but no assigment is done Used when a variable is defined through 
+#        the "global" statement but no assigment to this variable is done.
+# W0603: Using the global statement Used when you use the "global" statement to update 
+#        a global variable. PyLint just try to discourage this usage. That doesn't mean 
+#        you can not use it !
+# W0704: Except doesn't do anything Used when an except clause does nothing but "pass" 
+#        and there is no "else" clause.
+# I0011: Locally disabling %s Used when an inline option disable a message or a messages category.
+disable-msg=W0613,W0622,W0232,W0142,W0102,W0212,R0201,R0801,E1103,E1101,C0302,W0602,W0603,W0704,I0011
 
 
 [REPORTS]
@@ -130,7 +144,7 @@
 const-rgx=(([A-Z_][A-Z1-9_]*)|(__.*__)|([a-z_][a-z0-9_]*))$
 
 # Regular expression which should only match correct class names
-class-rgx=[A-Z_][a-zA-Z0-9]+$
+class-rgx=[a-zA-Z0-9]+$
 
 # Regular expression which should only match correct function names
 function-rgx=[a-z_][a-zA-Z0-9_]{2,40}$
@@ -139,7 +153,7 @@
 method-rgx=[a-z_][a-zA-Z0-9_]{2,40}$
 
 # Regular expression which should only match correct instance attribute names
-attr-rgx=[a-z_][a-z0-9_]{2,30}$
+attr-rgx=[a-z_][a-z0-9_]{1,30}$
 #alternative
 #attr-rgx=([a-z_][a-z0-9_]{2,30}|([a-z_][a-zA-Z0-9]{2,30}))$