summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvain Th?nault <sylvain.thenault@logilab.fr>2010-05-25 10:04:37 +0200
committerSylvain Th?nault <sylvain.thenault@logilab.fr>2010-05-25 10:04:37 +0200
commit25ea2bd6805c889c07ead9c0a5f244b64f49dcfb (patch)
treee62da224bd24b8cbd7f77607600736d9f085ea96
parent43198e3a5b83ff030641c0576aef93ca996be5e6 (diff)
downloadpylint-25ea2bd6805c889c07ead9c0a5f244b64f49dcfb.tar.gz
proper update of report identifiers to avoid collision with message in the Refactoring category
-rwxr-xr-xcheckers/base.py2
-rw-r--r--checkers/imports.py16
-rw-r--r--checkers/similar.py2
-rw-r--r--doc/features.txt14
-rw-r--r--examples/pylintrc6
5 files changed, 20 insertions, 20 deletions
diff --git a/checkers/base.py b/checkers/base.py
index 305888d..b670a71 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 d421ee8..38d5218 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 4660323..b5bd636 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 e3e43d7..2d0531a 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 cf5ef6d..82526fe 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=