diff options
-rwxr-xr-x | checkers/base.py | 2 | ||||
-rw-r--r-- | checkers/imports.py | 16 | ||||
-rw-r--r-- | checkers/similar.py | 2 | ||||
-rw-r--r-- | doc/features.txt | 14 | ||||
-rw-r--r-- | examples/pylintrc | 6 |
5 files changed, 20 insertions, 20 deletions
diff --git a/checkers/base.py b/checkers/base.py index 305888d3f..b670a713b 100755 --- a/checkers/base.py +++ b/checkers/base.py @@ -294,7 +294,7 @@ functions, methods 'used, separated by a comma'} ), ) - reports = ( ('R0101', 'Statistics by type', report_by_type_stats), ) + reports = ( ('RP0101', 'Statistics by type', report_by_type_stats), ) def __init__(self, linter): _BasicChecker.__init__(self, linter) diff --git a/checkers/imports.py b/checkers/imports.py index d421ee882..38d5218ef 100644 --- a/checkers/imports.py +++ b/checkers/imports.py @@ -125,7 +125,7 @@ def make_graph(filename, dep_info, sect, gtype): MSGS = { 'F0401': ('Unable to import %r' , 'Used when pylint has been unable to import a module.'), - 'R0401': ('Cyclic import (%s)', + 'RP0401': ('Cyclic import (%s)', 'Used when a cyclic import between two or more modules is \ detected.'), @@ -173,21 +173,21 @@ separated by a comma'} 'type' : 'string', 'metavar' : '<file.dot>', 'help' : 'Create a graph of every (i.e. internal and \ -external) dependencies in the given file (report R0402 must not be disabled)'} +external) dependencies in the given file (report RP0402 must not be disabled)'} ), ('ext-import-graph', {'default' : '', 'type' : 'string', 'metavar' : '<file.dot>', 'help' : 'Create a graph of external dependencies in the \ -given file (report R0402 must not be disabled)'} +given file (report RP0402 must not be disabled)'} ), ('int-import-graph', {'default' : '', 'type' : 'string', 'metavar' : '<file.dot>', 'help' : 'Create a graph of internal dependencies in the \ -given file (report R0402 must not be disabled)'} +given file (report RP0402 must not be disabled)'} ), ) @@ -197,9 +197,9 @@ given file (report R0402 must not be disabled)'} self.stats = None self.import_graph = None self.__int_dep_info = self.__ext_dep_info = None - self.reports = (('R0401', 'External dependencies', + self.reports = (('RP0401', 'External dependencies', self.report_external_dependencies), - ('R0402', 'Modules dependencies graph', + ('RP0402', 'Modules dependencies graph', self.report_dependencies_graph), ) @@ -213,9 +213,9 @@ given file (report R0402 must not be disabled)'} def close(self): """called before visiting project (i.e set of modules)""" # don't try to compute cycles if the associated message is disabled - if self.linter.is_message_enabled('R0401'): + if self.linter.is_message_enabled('RP0401'): for cycle in get_cycles(self.import_graph): - self.add_message('R0401', args=' -> '.join(cycle)) + self.add_message('RP0401', args=' -> '.join(cycle)) def visit_import(self, node): """triggered when an import statement is seen""" diff --git a/checkers/similar.py b/checkers/similar.py index 466032350..b5bd636a3 100644 --- a/checkers/similar.py +++ b/checkers/similar.py @@ -238,7 +238,7 @@ class SimilarChecker(BaseChecker, Similar): ), ) # reports - reports = ( ('R0801', 'Duplication', report_similarities), ) + reports = ( ('R0801', 'Duplication', report_similarities), ) # XXX actually a Refactoring message def __init__(self, linter=None): BaseChecker.__init__(self, linter) diff --git a/doc/features.txt b/doc/features.txt index e3e43d725..2d0531a8c 100644 --- a/doc/features.txt +++ b/doc/features.txt @@ -330,7 +330,7 @@ Messages Reports ~~~~~~~ -:R0101: Statistics by type +:RP0101: Statistics by type Typecheck checker @@ -391,12 +391,12 @@ Options Default: ``regsub,string,TERMIOS,Bastion,rexec`` :import-graph: Create a graph of every (i.e. internal and external) dependencies in the - given file (report R0402 must not be disabled) + given file (report RP0402 must not be disabled) :ext-import-graph: - Create a graph of external dependencies in the given file (report R0402 must + Create a graph of external dependencies in the given file (report RP0402 must not be disabled) :int-import-graph: - Create a graph of internal dependencies in the given file (report R0402 must + Create a graph of internal dependencies in the given file (report RP0402 must not be disabled) Messages @@ -414,15 +414,15 @@ Messages :W0410: *__future__ import is not the first non docstring statement* Python 2.5 and greater require __future__ import to be the first non docstring statement in the module. -:R0401: *Cyclic import (%s)* +:RP0401: *Cyclic import (%s)* Used when a cyclic import between two or more modules is detected. :F0401: *Unable to import %r (%s)* Used when pylint has been unable to import a module. Reports ~~~~~~~ -:R0401: External dependencies -:R0402: Modules dependencies graph +:RP0401: External dependencies +:RP0402: Modules dependencies graph Classes checker diff --git a/examples/pylintrc b/examples/pylintrc index cf5ef6deb..82526feb0 100644 --- a/examples/pylintrc +++ b/examples/pylintrc @@ -249,14 +249,14 @@ defining-attr-methods=__init__,__new__,setUp deprecated-modules=regsub,string,TERMIOS,Bastion,rexec # Create a graph of every (i.e. internal and external) dependencies in the -# given file (report R0402 must not be disabled) +# given file (report RP0402 must not be disabled) import-graph= -# Create a graph of external dependencies in the given file (report R0402 must +# Create a graph of external dependencies in the given file (report RP0402 must # not be disabled) ext-import-graph= -# Create a graph of internal dependencies in the given file (report R0402 must +# Create a graph of internal dependencies in the given file (report RP0402 must # not be disabled) int-import-graph= |