summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvain Th?nault <sylvain.thenault@logilab.fr>2013-04-16 12:11:35 +0200
committerSylvain Th?nault <sylvain.thenault@logilab.fr>2013-04-16 12:11:35 +0200
commit3302ce68f3968fac095164c17e530728e4c47e5f (patch)
tree3aeebd34ef2d28b2bb520e916d90e6725dadb20f
parent698ee3e15db3409daf4acba9e01af99e47733daa (diff)
downloadpylint-3302ce68f3968fac095164c17e530728e4c47e5f.tar.gz
regenerate generated documentation
-rw-r--r--doc/features.txt835
-rw-r--r--examples/pylintrc119
-rw-r--r--man/pylint.1110
3 files changed, 582 insertions, 482 deletions
diff --git a/doc/features.txt b/doc/features.txt
index 14eb92d..4b8d807 100644
--- a/doc/features.txt
+++ b/doc/features.txt
@@ -1,7 +1,7 @@
Pylint features
===============
-.. generated by pylint --full-documentation
+.. generated by pylint
.. contents::
@@ -21,8 +21,8 @@ General options
:profile:
Profiled execution.
:ignore:
- Add <file or directory> to the black list. It should be a base name, not a
- path. You may set this option multiple times.
+ Add files or directories to the blacklist. They should be base names, not
+ paths.
Default: ``CVS``
:persistent:
@@ -35,6 +35,23 @@ General options
:long-help:
more verbose help.
+Messages control options
+~~~~~~~~~~~~~~~~~~~~~~~~
+:enable:
+ Enable the message, report, category or checker with the given id(s). You can
+ either give multiple identifier separated by comma (,) or put this option
+ multiple time. See also the "--disable" option for examples.
+:disable:
+ Disable the message, report, category or checker with the given id(s). You
+ can either give multiple identifiers separated by comma (,) or put this
+ option multiple times (only on the command line, not in the configuration
+ file where it should appear only once).You can also use "--disable=all" to
+ disable everything first and then reenable specific checks. For example, if
+ you want to run only the similarities checker, you can use "--disable=all
+ --enable=similarities". If you want to run only the classes checker, but have
+ no Warning level messages displayed, use"--disable=all --enable=classes
+ --disable=W"
+
Commands options
~~~~~~~~~~~~~~~~
:help-msg:
@@ -51,27 +68,18 @@ Commands options
:generate-man:
Generate pylint's man page.
-Messages control options
-~~~~~~~~~~~~~~~~~~~~~~~~
-:enable:
- Enable the message, report, category or checker with the given id(s). You can
- either give multiple identifier separated by comma (,) or put this option
- multiple time.
-:disable:
- Disable the message, report, category or checker with the given id(s). You
- can either give multiple identifier separated by comma (,) or put this option
- multiple time (only on the command line, not in the configuration file where
- it should appear only once).
-
Reports options
~~~~~~~~~~~~~~~
:output-format:
Set the output format. Available formats are text, parseable, colorized, msvs
- (visual studio) and html
+ (visual studio) and html. You can also give a reporter class, eg
+ mypackage.mymodule.MyReporterClass.
Default: ``text``
:include-ids:
Include message's id in output
+:symbols:
+ Include symbolic ids of messages in output
:files-output:
Put messages in a separate file for each module / package specified on the
command line instead of printing them on stdout. Reports (if any) will be
@@ -92,20 +100,22 @@ Reports options
Add a comment according to your evaluation note. This is used by the global
evaluation report (RP0004).
-metrics checker
----------------
-
-Reports
-~~~~~~~
-:RP0701: Raw metrics
-
-
logging checker
---------------
Messages
~~~~~~~~
-:W1201: *Specify string format arguments as logging function parameters*
+:E1200 (logging-unsupported-format): *Unsupported logging format character %r (%#02x) at index %d*
+ Used when an unsupported format character is used in a logging statement
+ format string.
+:E1201 (logging-format-truncated): *Logging format string ends in middle of conversion specifier*
+ Used when a logging statement format string terminates before the end of a
+ conversion specifier.
+:E1205 (logging-too-many-args): *Too many arguments for logging format string*
+ Used when a logging format string is given too few arguments.
+:E1206 (logging-too-few-args): *Not enough arguments for logging format string*
+ Used when a logging format string is given too many arguments
+:W1201 (logging-not-lazy): *Specify string format arguments as logging function parameters*
Used when a logging statement has a call form of "logging.<logging
method>(format_string % (format_args...))". Such calls should leave string
interpolation to the logging method itself and be written "logging.<logging
@@ -113,79 +123,38 @@ Messages
incurring the cost of the interpolation in those cases in which no message
will be logged. For more, see http://www.python.org/dev/peps/pep-0282/.
-:E1200: *Unsupported logging format character %r (%#02x) at index %d*
- Used when an unsupported format character is used in a logging statement
- format string.
-
-:E1201: *'Logging format string ends in middle of conversion specifier*
- Used when a logging statement format string terminates before the end of a
- conversion specifier.
-
-:E1205: *Too many arguments for logging format string*
- Used when a logging format string is given too few arguments.
-
-:E1206: *Not enough arguments for logging format string*
- Used when a logging format string is given too many arguments.
-
-similarities checker
---------------------
-
-Options
-~~~~~~~
-:min-similarity-lines:
- Minimum lines number of a similarity.
-
- Default: ``4``
-:ignore-comments:
- Ignore comments when computing similarities.
-
- Default: ``yes``
-:ignore-docstrings:
- Ignore docstrings when computing similarities.
-
- Default: ``yes``
-
-Messages
-~~~~~~~~
-: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.
-
-Reports
-~~~~~~~
-:RP0801: Duplication
-
-string_format checker
----------------------
+string checker
+--------------
Messages
~~~~~~~~
-:E1300: *Unsupported format character %r (%#02x) at index %d*
+:E1300 (bad-format-character): *Unsupported format character %r (%#02x) at index %d*
Used when a unsupported format character is used in a format string.
-:E1301: *Format string ends in middle of conversion specifier*
+:E1301 (truncated-format-string): *Format string ends in middle of conversion specifier*
Used when a format string terminates before the end of a conversion specifier.
-:E1302: *Mixing named and unnamed conversion specifiers in format string*
+:E1302 (mixed-format-string): *Mixing named and unnamed conversion specifiers in format string*
Used when a format string contains both named (e.g. '%(foo)d') and unnamed
(e.g. '%d') conversion specifiers. This is also used when a named conversion
specifier contains * for the minimum field width and/or precision.
-:E1303: *Expected mapping for format string, not %s*
+:E1303 (format-needs-mapping): *Expected mapping for format string, not %s*
Used when a format string that uses named conversion specifiers is used with
an argument that is not a mapping.
-:E1304: *Missing key %r in format string dictionary*
+:E1304 (missing-format-string-key): *Missing key %r in format string dictionary*
Used when a format string that uses named conversion specifiers is used with a
dictionary that doesn't contain all the keys required by the format string.
-:E1305: *Too many arguments for format string*
+:E1305 (too-many-format-args): *Too many arguments for format string*
Used when a format string that uses unnamed conversion specifiers is given too
few arguments.
-:E1306: *Not enough arguments for format string*
+:E1306 (too-few-format-args): *Not enough arguments for format string*
Used when a format string that uses unnamed conversion specifiers is given too
many arguments
-:W1300: *Format string dictionary key should be a string, not %s*
+:E1310 (bad-str-strip-call): *Suspicious argument in %s.%s call*
+ The argument to a str.{l,r,}strip call contains a duplicate character,
+:W1300 (bad-format-string-key): *Format string dictionary key should be a string, not %s*
Used when a format string that uses named conversion specifiers is used with a
dictionary whose keys are not all strings.
-:W1301: *Unused key %r in format string dictionary*
+:W1301 (unused-format-string-key): *Unused key %r in format string dictionary*
Used when a format string that uses named conversion specifiers is used with a
dictionary that conWtains keys not required by the format string.
@@ -211,90 +180,81 @@ Options
Messages
~~~~~~~~
-:W0301: *Unnecessary semicolon*
+:W0301 (unnecessary-semicolon): *Unnecessary semicolon*
Used when a statement is ended by a semi-colon (";"), which isn't necessary
(that's python, not C ;).
-:W0311: *Bad indentation. Found %s %s, expected %s*
+:W0311 (bad-indentation): *Bad indentation. Found %s %s, expected %s*
Used when an unexpected number of indentation's tabulations or spaces has been
found.
-:W0312: *Found indentation with %ss instead of %ss*
+:W0312 (mixed-indentation): *Found indentation with %ss instead of %ss*
Used when there are some mixed tabs and spaces in a module.
-:W0331: *Use of the <> operator*
+:W0331 (old-ne-operator): *Use of the <> operator*
Used when the deprecated "<>" operator is used instead of "!=".
-:W0332: *Use of "l" as long integer identifier*
+:W0332 (lowercase-l-suffix): *Use of "l" as long integer identifier*
Used when a lower case "l" is used to mark a long integer. You should use a
upper case "L" since the letter "l" looks too much like the digit "1"
-:W0333: *Use of the `` operator*
+:W0333 (backtick): *Use of the `` operator*
Used when the deprecated "``" (backtick) operator is used instead of the str()
function.
-:C0301: *Line too long (%s/%s)*
+:C0301 (line-too-long): *Line too long (%s/%s)*
Used when a line is longer than a given number of characters.
-:C0302: *Too many lines in module (%s)*
+:C0302 (too-many-lines): *Too many lines in module (%s)*
Used when a module has too much lines, reducing its readability.
-:C0321: *More than one statement on a single line*
+:C0321 (multiple-statements): *More than one statement on a single line*
Used when more than on statement are found on the same line.
-:C0322: *Operator not preceded by a space*
+:C0322 (no-space-before-operator): *Operator not preceded by a space*
Used when one of the following operator (!= | <= | == | >= | < | > | = | \+= |
-= | \*= | /= | %) is not preceded by a space.
-:C0323: *Operator not followed by a space*
+:C0323 (no-space-after-operator): *Operator not followed by a space*
Used when one of the following operator (!= | <= | == | >= | < | > | = | \+= |
-= | \*= | /= | %) is not followed by a space.
-:C0324: *Comma not followed by a space*
+:C0324 (no-space-after-comma): *Comma not followed by a space*
Used when a comma (",") is not followed by a space.
-typecheck checker
------------------
+imports checker
+---------------
Options
~~~~~~~
-:ignore-mixin-members:
- Tells whether missing members accessed in mixin class should be ignored. A
- mixin class is detected if its name ends with "mixin" (case insensitive).
-
- Default: ``yes``
-:ignored-classes:
- List of classes names for which member attributes should not be checked
- (useful for classes with attributes dynamically set).
-
- Default: ``SQLObject``
-:zope:
- When zope mode is activated, add a predefined set of Zope acquired attributes
- to generated-members.
-:generated-members:
- List of members which are set dynamically and missed by pylint inference
- system, and so shouldn't trigger E0201 when accessed.
+:deprecated-modules:
+ Deprecated modules which should not be used, separated by a comma
- Default: ``REQUEST,acl_users,aq_parent``
+ Default: ``regsub,string,TERMIOS,Bastion,rexec``
+:import-graph:
+ Create a graph of every (i.e. internal and external) dependencies in the
+ given file (report RP0402 must not be disabled)
+:ext-import-graph:
+ 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 RP0402 must
+ not be disabled)
Messages
~~~~~~~~
-:E1101: *%s %r has no %r member*
- Used when a variable is accessed for an unexistent member.
-:E1102: *%s is not callable*
- Used when an object being called has been inferred to a non callable object
-:E1103: *%s %r has no %r member (but some types could not be inferred)*
- Used when a variable is accessed for an unexistent member, but astng was not
- able to interpret all possible types of this variable.
-:E1111: *Assigning to function call which doesn't return*
- Used when an assignment is done on a function call but the inferred function
- doesn't return anything.
-:E1120: *No value passed for parameter %s in function call*
- Used when a function call passes too few arguments.
-:E1121: *Too many positional arguments for function call*
- Used when a function call passes too many positional arguments.
-:E1122: *Duplicate keyword argument %r in function call*
- Used when a function call passes the same keyword argument multiple times.
-:E1123: *Passing unexpected keyword argument %r in function call*
- Used when a function call passes a keyword argument that doesn't correspond to
- one of the function's parameter names.
-:E1124: *Multiple values passed for parameter %r in function call*
- Used when a function call would result in assigning multiple values to a
- function parameter, one value from a positional argument and one from a
- keyword argument.
-:W1111: *Assigning to function call which only returns None*
- Used when an assignment is done on a function call but the inferred function
- returns nothing but None.
+:W0401 (wildcard-import): *Wildcard import %s*
+ Used when `from module import *` is detected.
+:W0402 (deprecated-module): *Uses of a deprecated module %r*
+ Used a module marked as deprecated is imported.
+:W0403 (relative-import): *Relative import %r, should be %r*
+ Used when an import relative to the package directory is detected.
+:W0404 (reimported): *Reimport %r (imported line %s)*
+ Used when a module is reimported multiple times.
+:W0406 (import-self): *Module import itself*
+ Used when a module is importing itself.
+:W0410 (misplaced-future): *__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): *Cyclic import (%s)*
+ Used when a cyclic import between two or more modules is detected.
+:F0401 (import-error): *Unable to import %s*
+ Used when pylint has been unable to import a module.
+
+Reports
+~~~~~~~
+:RP0401: External dependencies
+:RP0402: Modules dependencies graph
variables checker
@@ -315,107 +275,224 @@ Options
Messages
~~~~~~~~
-:E0601: *Using variable %r before assignment*
+:E0601 (used-before-assignment): *Using variable %r before assignment*
Used when a local variable is accessed before it's assignment.
-:E0602: *Undefined variable %r*
+:E0602 (undefined-variable): *Undefined variable %r*
Used when an undefined variable is accessed.
-:E0611: *No name %r in module %r*
+:E0603 (undefined-all-variable): *Undefined variable name %r in __all__*
+ Used when an undefined variable name is referenced in __all__.
+:E0604 (invalid-all-object): *Invalid object %r in __all__, must contain only strings*
+ Used when an invalid (non-string) object occurs in __all__.
+:E0611 (no-name-in-module): *No name %r in module %r*
Used when a name cannot be found in a module.
-:W0601: *Global variable %r undefined at the module level*
+:W0601 (global-variable-undefined): *Global variable %r undefined at the module level*
Used when a variable is defined through the "global" statement but the
variable is not defined in the module scope.
-:W0602: *Using global for %r but no assignment is done*
+:W0602 (global-variable-not-assigned): *Using global for %r but no assignment is done*
Used when a variable is defined through the "global" statement but no
assignment to this variable is done.
-:W0603: *Using the global statement*
- Used when you use the "global" statement to update a global variable. Pylint
+:W0603 (global-statement): *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 !
-:W0604: *Using the global statement at the module level*
+:W0604 (global-at-module-level): *Using the global statement at the module level*
Used when you use the "global" statement at the module level since it has no
effect
-:W0611: *Unused import %s*
+:W0611 (unused-import): *Unused import %s*
Used when an imported module or variable is not used.
-:W0612: *Unused variable %r*
+:W0612 (unused-variable): *Unused variable %r*
Used when a variable is defined but not used.
-:W0613: *Unused argument %r*
+:W0613 (unused-argument): *Unused argument %r*
Used when a function or method argument is not used.
-:W0614: *Unused import %s from wildcard import*
+:W0614 (unused-wildcard-import): *Unused import %s from wildcard import*
Used when an imported module or variable is not used from a 'from X import *'
style import.
-:W0621: *Redefining name %r from outer scope (line %s)*
+:W0621 (redefined-outer-name): *Redefining name %r from outer scope (line %s)*
Used when a variable's name hide a name defined in the outer scope.
-:W0622: *Redefining built-in %r*
+:W0622 (redefined-builtin): *Redefining built-in %r*
Used when a variable or function override a built-in.
-:W0631: *Using possibly undefined loop variable %r*
+:W0623 (redefine-in-handler): *Redefining name %r from %s in exception handler*
+ Used when an exception handler assigns the exception to an existing name
+:W0631 (undefined-loop-variable): *Using possibly undefined loop variable %r*
Used when an loop variable (i.e. defined by a for loop or a list comprehension
or a generator expression) is used outside the loop.
-miscellaneous checker
----------------------
+basic checker
+-------------
Options
~~~~~~~
-:notes:
- List of note tags to take in consideration, separated by a comma.
+:required-attributes:
+ Required attributes for module, separated by a comma
+:bad-functions:
+ List of builtins function names that should not be used, separated by a comma
- Default: ``FIXME,XXX,TODO``
+ Default: ``map,filter,apply,input``
+:module-rgx:
+ Regular expression which should only match correct module names
+
+ Default: ``(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$``
+:const-rgx:
+ Regular expression which should only match correct module level names
+
+ Default: ``(([A-Z_][A-Z0-9_]*)|(__.*__))$``
+:class-rgx:
+ Regular expression which should only match correct class names
+
+ Default: ``[A-Z_][a-zA-Z0-9]+$``
+:function-rgx:
+ Regular expression which should only match correct function names
+
+ Default: ``[a-z_][a-z0-9_]{2,30}$``
+:method-rgx:
+ Regular expression which should only match correct method names
+
+ Default: ``[a-z_][a-z0-9_]{2,30}$``
+:attr-rgx:
+ Regular expression which should only match correct instance attribute names
+
+ Default: ``[a-z_][a-z0-9_]{2,30}$``
+:argument-rgx:
+ Regular expression which should only match correct argument names
+
+ Default: ``[a-z_][a-z0-9_]{2,30}$``
+:variable-rgx:
+ Regular expression which should only match correct variable names
+
+ Default: ``[a-z_][a-z0-9_]{2,30}$``
+:inlinevar-rgx:
+ Regular expression which should only match correct list comprehension /
+ generator expression variable names
+
+ Default: ``[A-Za-z_][A-Za-z0-9_]*$``
+:good-names:
+ Good variable names which should always be accepted, separated by a comma
+
+ Default: ``i,j,k,ex,Run,_``
+:bad-names:
+ Bad variable names which should always be refused, separated by a comma
+
+ Default: ``foo,bar,baz,toto,tutu,tata``
+:no-docstring-rgx:
+ Regular expression which should only match functions or classes name which do
+ not require a docstring
+
+ Default: ``__.*__``
Messages
~~~~~~~~
-:E0501: *Non ascii characters found but no encoding specified (PEP 263)*
- Used when some non ascii characters are detected but now encoding is
- specified, as explicited in the PEP 263.
-:E0502: *Wrong encoding specified (%s)*
- Used when a known encoding is specified but the file doesn't seem to be
- actually in this encoding.
-:W0511:
- Used when a warning note as FIXME or XXX is detected.
+:E0100 (init-is-generator): *__init__ method is a generator*
+ Used when the special class method __init__ is turned into a generator by a
+ yield in its body.
+:E0101 (return-in-init): *Explicit return in __init__*
+ Used when the special class method __init__ has an explicit return value.
+:E0102 (function-redefined): *%s already defined line %s*
+ Used when a function / class / method is redefined.
+:E0103 (not-in-loop): *%r not properly in loop*
+ Used when break or continue keywords are used outside a loop.
+:E0104 (return-outside-function): *Return outside function*
+ Used when a "return" statement is found outside a function or method.
+:E0105 (yield-outside-function): *Yield outside function*
+ Used when a "yield" statement is found outside a function or method.
+:E0106 (return-arg-in-generator): *Return with argument inside generator*
+ Used when a "return" statement with an argument is found outside in a
+ generator function or method (e.g. with some "yield" statements).
+:E0107 (nonexistent-operator): *Use of the non-existent %s operator*
+ Used when you attempt to use the C-style pre-increment orpre-decrement
+ operator -- and ++, which doesn't exist in Python.
+:E0108 (duplicate-argument-name): *Duplicate argument name %s in function definition*
+ Duplicate argument names in function definitions are syntax errors.
+:W0101 (unreachable): *Unreachable code*
+ Used when there is some code behind a "return" or "raise" statement, which
+ will never be accessed.
+:W0102 (dangerous-default-value): *Dangerous default value %s as argument*
+ Used when a mutable value as list or dictionary is detected in a default value
+ for an argument.
+:W0104 (pointless-statement): *Statement seems to have no effect*
+ Used when a statement doesn't have (or at least seems to) any effect.
+:W0105 (pointless-string-statement): *String statement has no effect*
+ Used when a string is used as a statement (which of course has no effect).
+ This is a particular case of W0104 with its own message so you can easily
+ disable it if you're using those strings as documentation, instead of
+ comments.
+:W0106 (expression-not-assigned): *Expression "%s" is assigned to nothing*
+ Used when an expression that is not a function call is assigned to nothing.
+ Probably something else was intended.
+:W0107 (unnecessary-pass): *Unnecessary pass statement*
+ Used when a "pass" statement that can be avoided is encountered.
+:W0108 (unnecessary-lambda): *Lambda may not be necessary*
+ Used when the body of a lambda expression is a function call on the same
+ argument list as the lambda itself; such lambda expressions are in all but a
+ few cases replaceable with the function being called in the body of the
+ lambda.
+:W0109 (duplicate-key): *Duplicate key %r in dictionary*
+ Used when a dictionary expression binds the same key multiple times.
+:W0110 (deprecated-lambda): *map/filter on lambda could be replaced by comprehension*
+ Used when a lambda is the first argument to "map" or "filter". It could be
+ clearer as a list comprehension or generator expression.
+:W0122 (exec-statement): *Use of the exec statement*
+ Used when you use the "exec" statement, to discourage its usage. That doesn't
+ mean you can not use it !
+:W0141 (bad-builtin): *Used builtin function %r*
+ Used when a black listed builtin function is used (see the bad-function
+ option). Usual black listed functions are the ones like map, or filter , where
+ Python offers now some cleaner alternative like list comprehension.
+:W0142 (star-args): *Used * or ** magic*
+ Used when a function or method is called using `*args` or `**kwargs` to
+ dispatch arguments. This doesn't improve readability and should be used with
+ care.
+:W0150 (lost-exception): *%s statement in finally block may swallow exception*
+ Used when a break or a return statement is found inside the finally clause of
+ a try...finally block: the exceptions raised in the try clause will be
+ silently swallowed instead of being re-raised.
+:W0199 (assert-on-tuple): *Assert called on a 2-uple. Did you mean 'assert x,y'?*
+ A call of assert on a tuple will always evaluate to true if the tuple is not
+ empty, and will always evaluate to false if it is.
+:C0102 (blacklisted-name): *Black listed name "%s"*
+ Used when the name is listed in the black list (unauthorized names).
+:C0103 (invalid-name): *Invalid name "%s" for type %s (should match %s)*
+ Used when the name doesn't match the regular expression associated to its type
+ (constant, variable, class...).
+:C0109 (useless-else-on-loop): *Else clause on loop without break or return statement*
+ Loops should only have an else clause if they can exit early with a break
+ statement, otherwise the statements under else should be on the same scope as
+ the loop itself.
+:C0111 (missing-docstring): *Missing docstring*
+ Used when a module, function, class or method has no docstring. Some special
+ methods like __init__ doesn't necessary require a docstring.
+:C0112 (empty-docstring): *Empty docstring*
+ Used when a module, function, class or method has an empty docstring (it would
+ be too easy ;).
+:C0121 (missing-module-attribute): *Missing required attribute "%s"*
+ Used when an attribute required for modules is missing.
+Reports
+~~~~~~~
+:RP0101: Statistics by type
-imports checker
----------------
+
+miscellaneous checker
+---------------------
Options
~~~~~~~
-:deprecated-modules:
- Deprecated modules which should not be used, separated by a comma
+:notes:
+ List of note tags to take in consideration, separated by a comma.
- Default: ``regsub,string,TERMIOS,Bastion,rexec``
-:import-graph:
- Create a graph of every (i.e. internal and external) dependencies in the
- given file (report RP0402 must not be disabled)
-:ext-import-graph:
- 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 RP0402 must
- not be disabled)
+ Default: ``FIXME,XXX,TODO``
Messages
~~~~~~~~
-:W0401: *Wildcard import %s*
- Used when `from module import *` is detected.
-:W0402: *Uses of a deprecated module %r*
- Used a module marked as deprecated is imported.
-:W0403: *Relative import %r, should be %r*
- Used when an import relative to the package directory is detected.
-:W0404: *Reimport %r (imported line %s)*
- Used when a module is reimported multiple times.
-:W0406: *Module import itself*
- Used when a module is importing itself.
-: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)*
- Used when a cyclic import between two or more modules is detected.
-:F0401: *Unable to import %r*
- Used when pylint has been unable to import a module.
+:W0511 (fixme):
+ Used when a warning note as FIXME or XXX is detected.
+
+
+metrics checker
+---------------
Reports
~~~~~~~
-:RP0401: External dependencies
-:RP0402: Modules dependencies graph
+:RP0701: Raw metrics
classes checker
@@ -432,65 +509,82 @@ Options
List of method names used to declare (i.e. assign) instance attributes.
Default: ``__init__,__new__,setUp``
+:valid-classmethod-first-arg:
+ List of valid names for the first argument in a class method.
+
+ Default: ``cls``
+:valid-metaclass-classmethod-first-arg:
+ List of valid names for the first argument in a metaclass class method.
+
+ Default: ``mcs``
Messages
~~~~~~~~
-:E0202: *An attribute inherited from %s hide this method*
+:E0202 (method-hidden): *An attribute affected in %s line %s hide this method*
Used when a class defines a method which is hidden by an instance attribute
- from an ancestor class.
-:E0203: *Access to member %r before its definition line %s*
+ from an ancestor class or set by some client code.
+:E0203 (access-member-before-definition): *Access to member %r before its definition line %s*
Used when an instance member is accessed before it's actually assigned.
-:E0211: *Method has no argument*
+:E0211 (no-method-argument): *Method has no argument*
Used when a method which should have the bound instance as first argument has
no argument defined.
-:E0213: *Method should have "self" as first argument*
+:E0213 (no-self-argument): *Method should have "self" as first argument*
Used when a method has an attribute different the "self" as first argument.
This is considered as an error since this is a so common convention that you
shouldn't break it!
-:E0221: *Interface resolved to %s is not a class*
+:E0221 (interface-is-not-class): *Interface resolved to %s is not a class*
Used when a class claims to implement an interface which is not a class.
-:E0222: *Missing method %r from %s interface*
+:E0222 (missing-interface-method): *Missing method %r from %s interface*
Used when a method declared in an interface is missing from a class
implementing this interface
-:W0201: *Attribute %r defined outside __init__*
+:W0201 (attribute-defined-outside-init): *Attribute %r defined outside __init__*
Used when an instance attribute is defined outside the __init__ method.
-:W0211: *Static method with %r as first argument*
- Used when a static method has "self" or "cls" as first argument.
-:W0212: *Access to a protected member %s of a client class*
+:W0211 (bad-staticmethod-argument): *Static method with %r as first argument*
+ Used when a static method has "self" or a value specified in
+ valid-classmethod-first-arg option or valid-metaclass-classmethod-first-arg
+ option as first argument.
+:W0212 (protected-access): *Access to a protected member %s of a client class*
Used when a protected member (i.e. class member with a name beginning with an
underscore) is access outside the class or a descendant of the class where
it's defined.
-:W0221: *Arguments number differs from %s method*
+:W0221 (arguments-differ): *Arguments number differs from %s method*
Used when a method has a different number of arguments than in the implemented
interface or in an overridden method.
-:W0222: *Signature differs from %s method*
+:W0222 (signature-differs): *Signature differs from %s method*
Used when a method signature is different than in the implemented interface or
in an overridden method.
-:W0223: *Method %r is abstract in class %r but is not overridden*
+:W0223 (abstract-method): *Method %r is abstract in class %r but is not overridden*
Used when an abstract method (i.e. raise NotImplementedError) is not
overridden in concrete class.
-:W0231: *__init__ method from base class %r is not called*
+:W0231 (super-init-not-called): *__init__ method from base class %r is not called*
Used when an ancestor class method has an __init__ method which is not called
by a derived class.
-:W0232: *Class has no __init__ method*
+:W0232 (no-init): *Class has no __init__ method*
Used when a class has no __init__ method, neither its parent classes.
-:W0233: *__init__ method from a non direct base class %r is called*
+:W0233 (non-parent-init-called): *__init__ method from a non direct base class %r is called*
Used when an __init__ method is called on a class which is not in the direct
ancestors for the analysed class.
-:R0201: *Method could be a function*
+:R0201 (no-self-use): *Method could be a function*
Used when a method doesn't use its bound instance, and so could be written as
a function.
-:C0202: *Class method should have "cls" as first argument*
- Used when a class method has an attribute different than "cls" as first
- argument, to easily differentiate them from regular instance methods.
-:C0203: *Metaclass method should have "mcs" as first argument*
- Used when a metaclass method has an attribute different the "mcs" as first
- argument.
-:F0202: *Unable to check methods signature (%s / %s)*
- Used when Pylint has been unable to check methods signature compatibility for
+:C0202 (bad-classmethod-argument): *Class method %s should have %s as first argument*
+ Used when a class method has a first argument named differently than the value
+ specified in valid-classmethod-first-arg option (default to "cls"),
+ recommended to easily differentiate them from regular instance methods.
+:C0203 (bad-mcs-method-argument): *Metaclass method %s should have %s as first argument*
+ Used when a metaclass method has a first agument named differently than the
+ value specified in valid-classmethod-first-arg option (default to "cls"),
+ recommended to easily differentiate them from regular instance methods.
+:C0204 (bad-mcs-classmethod-argument): *Metaclass class method %s should have %s as first argument*
+ Used when a metaclass class method has a first argument named differently than
+ the value specified in valid-metaclass-classmethod-first-arg option (default
+ to "mcs"), recommended to easily differentiate them from regular instance
+ methods.
+:F0202 (method-check-failed): *Unable to check methods signature (%s / %s)*
+ Used when PyLint has been unable to check methods signature compatibility for
an unexpected reason. Please report this kind if you don't make sense of it.
-:F0220: *failed to resolve interfaces implemented by %s (%s)*
- Used when a Pylint as failed to find interfaces implemented by a class
+:F0220 (unresolved-interface): *failed to resolve interfaces implemented by %s (%s)*
+ Used when a PyLint as failed to find interfaces implemented by a class
design checker
@@ -542,212 +636,126 @@ Options
Messages
~~~~~~~~
-:R0901: *Too many ancestors (%s/%s)*
+:R0901 (too-many-ancestors): *Too many ancestors (%s/%s)*
Used when class has too many parent classes, try to reduce this to get a more
simple (and so easier to use) class.
-:R0902: *Too many instance attributes (%s/%s)*
+:R0902 (too-many-instance-attributes): *Too many instance attributes (%s/%s)*
Used when class has too many instance attributes, try to reduce this to get a
more simple (and so easier to use) class.
-:R0903: *Too few public methods (%s/%s)*
+:R0903 (too-few-public-methods): *Too few public methods (%s/%s)*
Used when class has too few public methods, so be sure it's really worth it.
-:R0904: *Too many public methods (%s/%s)*
+:R0904 (too-many-public-methods): *Too many public methods (%s/%s)*
Used when class has too many public methods, try to reduce this to get a more
simple (and so easier to use) class.
-:R0911: *Too many return statements (%s/%s)*
+:R0911 (too-many-return-statements): *Too many return statements (%s/%s)*
Used when a function or method has too many return statement, making it hard
to follow.
-:R0912: *Too many branches (%s/%s)*
+:R0912 (too-many-branches): *Too many branches (%s/%s)*
Used when a function or method has too many branches, making it hard to
follow.
-:R0913: *Too many arguments (%s/%s)*
+:R0913 (too-many-arguments): *Too many arguments (%s/%s)*
Used when a function or method takes too many arguments.
-:R0914: *Too many local variables (%s/%s)*
+:R0914 (too-many-locals): *Too many local variables (%s/%s)*
Used when a function or method has too many local variables.
-:R0915: *Too many statements (%s/%s)*
+:R0915 (too-many-statements): *Too many statements (%s/%s)*
Used when a function or method has too many statements. You should then split
it in smaller functions / methods.
-:R0921: *Abstract class not referenced*
+:R0921 (abstract-class-not-used): *Abstract class not referenced*
Used when an abstract class is not used as ancestor anywhere.
-:R0922: *Abstract class is only referenced %s times*
+:R0922 (abstract-class-little-used): *Abstract class is only referenced %s times*
Used when an abstract class is used less than X times as ancestor.
-:R0923: *Interface not implemented*
+:R0923 (interface-not-implemented): *Interface not implemented*
Used when an interface class is not implemented anywhere.
+:R0924 (incomplete-protocol): *Badly implemented %s, implements %s but not %s*
+ A class implements some of the special methods for a particular protocol, but
+ not all of them
-basic checker
--------------
-
-Options
-~~~~~~~
-:module-rgx:
- Regular expression which should only match correct module names
-
- Default: ``(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$``
-:const-rgx:
- Regular expression which should only match correct module level names
-
- Default: ``(([A-Z_][A-Z0-9_]*)|(__.*__))$``
-:class-rgx:
- Regular expression which should only match correct class names
-
- Default: ``[A-Z_][a-zA-Z0-9]+$``
-:function-rgx:
- Regular expression which should only match correct function names
-
- Default: ``[a-z_][a-z0-9_]{2,30}$``
-:method-rgx:
- Regular expression which should only match correct method names
-
- Default: ``[a-z_][a-z0-9_]{2,30}$``
-:attr-rgx:
- Regular expression which should only match correct instance attribute names
-
- Default: ``[a-z_][a-z0-9_]{2,30}$``
-:argument-rgx:
- Regular expression which should only match correct argument names
+string_constant checker
+-----------------------
- Default: ``[a-z_][a-z0-9_]{2,30}$``
-:variable-rgx:
- Regular expression which should only match correct variable names
+Messages
+~~~~~~~~
+:W1401 (anomalous-backslash-in-string): *Anomalous backslash in string: '%s'. String constant might be missing an r prefix.*
+ Used when a backslash is in a literal string but not as an escape.
+:W1402 (anomalous-unicode-escape-in-string): *Anomalous Unicode escape in byte string: '%s'. String constant might be missing an r or u prefix.*
+ Used when an escape like \u is encountered in a byte string where it has no
+ effect.
- Default: ``[a-z_][a-z0-9_]{2,30}$``
-:inlinevar-rgx:
- Regular expression which should only match correct list comprehension /
- generator expression variable names
- Default: ``[A-Za-z_][A-Za-z0-9_]*$``
-:good-names:
- Good variable names which should always be accepted, separated by a comma
+similarities checker
+--------------------
- Default: ``i,j,k,ex,Run,_``
-:bad-names:
- Bad variable names which should always be refused, separated by a comma
+Options
+~~~~~~~
+:min-similarity-lines:
+ Minimum lines number of a similarity.
- Default: ``foo,bar,baz,toto,tutu,tata``
-:no-docstring-rgx:
- Regular expression which should only match functions or classes name which do
- not require a docstring
+ Default: ``4``
+:ignore-comments:
+ Ignore comments when computing similarities.
- Default: ``__.*__``
-:required-attributes:
- Required attributes for module, separated by a comma
-:bad-functions:
- List of builtins function names that should not be used, separated by a comma
+ Default: ``yes``
+:ignore-docstrings:
+ Ignore docstrings when computing similarities.
- Default: ``map,filter,apply,input``
+ Default: ``yes``
+:ignore-imports:
+ Ignore imports when computing similarities.
Messages
~~~~~~~~
-:E0100: *__init__ method is a generator*
- Used when the special class method __init__ is turned into a generator by a
- yield in its body.
-:E0101: *Explicit return in __init__*
- Used when the special class method __init__ has an explicit return value.
-:E0102: *%s already defined line %s*
- Used when a function / class / method is redefined.
-:E0103: *%r not properly in loop*
- Used when break or continue keywords are used outside a loop.
-:E0104: *Return outside function*
- Used when a "return" statement is found outside a function or method.
-:E0105: *Yield outside function*
- Used when a "yield" statement is found outside a function or method.
-:E0106: *Return with argument inside generator*
- Used when a "return" statement with an argument is found outside in a
- generator function or method (e.g. with some "yield" statements).
-:E0107: *Use of the non-existent %s operator*
- Used when you attempt to use the C-style pre-increment orpre-decrement
- operator -- and ++, which doesn't exist in Python.
-:W0101: *Unreachable code*
- Used when there is some code behind a "return" or "raise" statement, which
- will never be accessed.
-:W0102: *Dangerous default value %s as argument*
- Used when a mutable value as list or dictionary is detected in a default value
- for an argument.
-:W0104: *Statement seems to have no effect*
- Used when a statement doesn't have (or at least seems to) any effect.
-:W0105: *String statement has no effect*
- Used when a string is used as a statement (which of course has no effect).
- This is a particular case of W0104 with its own message so you can easily
- disable it if you're using those strings as documentation, instead of
- comments.
-:W0106: *Expression "%s" is assigned to nothing',*
- Used when an expression that is not a function call is assigned to nothing.
- Probably something else was intended.
-:W0107: *Unnecessary pass statement*
- Used when a "pass" statement that can be avoided is encountered.)
-:W0108: *Lambda may not be necessary*
- Used when the body of a lambda expression is a function call on the same
- argument list as the lambda itself; such lambda expressions are in all but a
- few cases replaceable with the function being called in the body of the
- lambda.
-:W0109: *Duplicate key %r in dictionary*
- Used when a dictionary expression binds the same key multiple times.
-:W0122: *Use of the exec statement*
- Used when you use the "exec" statement, to discourage its usage. That doesn't
- mean you can not use it !
-:W0141: *Used builtin function %r*
- Used when a black listed builtin function is used (see the bad-function
- option). Usual black listed functions are the ones like map, or filter , where
- Python offers now some cleaner alternative like list comprehension.
-:W0142: *Used * or ** magic*
- Used when a function or method is called using `*args` or `**kwargs` to
- dispatch arguments. This doesn't improve readability and should be used with
- care.
-:W0150: *%s statement in finally block may swallow exception*
- Used when a break or a return statement is found inside the finally clause of
- a try...finally block: the exceptions raised in the try clause will be
- silently swallowed instead of being re-raised.
-:W0199: *Assert called on a 2-uple. Did you mean 'assert x,y'?*
- A call of assert on a tuple will always evaluate to true if the tuple is not
- empty, and will always evaluate to false if it is.
-:C0102: *Black listed name "%s"*
- Used when the name is listed in the black list (unauthorized names).
-:C0103: *Invalid name "%s" (should match %s)*
- Used when the name doesn't match the regular expression associated to its type
- (constant, variable, class...).
-:C0111: *Missing docstring*
- Used when a module, function, class or method has no docstring. Some special
- methods like __init__ doesn't necessary require a docstring.
-:C0112: *Empty docstring*
- Used when a module, function, class or method has an empty docstring (it would
- be too easy ;).
-:C0121: *Missing required attribute "%s"*
- Used when an attribute required for modules is missing.
+:R0801 (duplicate-code): *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.
Reports
~~~~~~~
-:RP0101: Statistics by type
+:RP0801: Duplication
exceptions checker
------------------
+Options
+~~~~~~~
+:overgeneral-exceptions:
+ Exceptions that will emit a warning when being caught. Defaults to
+ "Exception"
+
+ Default: ``Exception``
+
Messages
~~~~~~~~
-:E0701: *Bad except clauses order (%s)*
+:E0701 (bad-except-order): *Bad except clauses order (%s)*
Used when except clauses are not in the correct order (from the more specific
to the more generic). If you don't fix the order, some exceptions may not be
catched by the most specific handler.
-:E0702: *Raising %s while only classes, instances or string are allowed*
+:E0702 (raising-bad-type): *Raising %s while only classes, instances or string are allowed*
Used when something which is neither a class, an instance or a string is
raised (i.e. a `TypeError` will be raised).
-:E0710: *Raising a new style class which doesn't inherit from BaseException*
- Used when a new style class which doesn't inherit from BaseException is raised
- since it's not possible with python >= 2.5.
-:E0711: *NotImplemented raised - should raise NotImplementedError*
+:E0710 (raising-non-exception): *Raising a new style class which doesn't inherit from BaseException*
+ Used when a new style class which doesn't inherit from BaseException is
+ raised.
+:E0711 (notimplemented-raised): *NotImplemented raised - should raise NotImplementedError*
Used when NotImplemented is raised instead of NotImplementedError
-:W0701: *Raising a string exception*
+:W0701 (raising-string): *Raising a string exception*
Used when a string exception is raised.
-:W0702: *No exception type(s) specified*
+:W0702 (bare-except): *No exception type(s) specified*
Used when an except clause doesn't specify exceptions type to catch.
-:W0703: *Catch "Exception"*
- Used when an except catches Exception instances.
-:W0704: *Except doesn't do anything*
+:W0703 (broad-except): *Catching too general exception %s*
+ Used when an except catches a too general exception, possibly burying
+ unrelated errors.
+:W0704 (pointless-except): *Except doesn't do anything*
Used when an except clause does nothing but "pass" and there is no "else"
clause.
-:W0710: *Exception doesn't inherit from standard "Exception" class*
+:W0710 (nonstandard-exception): *Exception doesn't inherit from standard "Exception" class*
Used when a custom exception class is raised but doesn't inherit from the
builtin "Exception" class.
+:W0711 (binary-op-exception): *Exception to catch is the result of a binary "%s" operation*
+ Used when the exception to catch is of the form "except A or B:". If intending
+ to catch multiple, rewrite as "except (A, B):"
newstyle checker
@@ -755,15 +763,70 @@ newstyle checker
Messages
~~~~~~~~
-:E1001: *Use __slots__ on an old style class*
- Used when an old style class use the __slots__ attribute.
-:E1002: *Use super on an old style class*
- Used when an old style class use the super builtin.
-:E1003: *Bad first argument %r given to super class*
+:E1001 (slots-on-old-class): *Use of __slots__ on an old style class*
+ Used when an old style class uses the __slots__ attribute.
+:E1002 (super-on-old-class): *Use of super on an old style class*
+ Used when an old style class uses the super builtin.
+:E1003 (bad-super-call): *Bad first argument %r given to super class*
Used when another argument than the current class is given as first argument
of the super builtin.
-:W1001: *Use of "property" on an old style class*
- Used when Pylint detect the use of the builtin "property" on an old style
+:W1001 (property-on-old-class): *Use of "property" on an old style class*
+ Used when PyLint detect the use of the builtin "property" on an old style
class while this is relying on new style classes features
+typecheck checker
+-----------------
+
+Options
+~~~~~~~
+:ignore-mixin-members:
+ Tells whether missing members accessed in mixin class should be ignored. A
+ mixin class is detected if its name ends with "mixin" (case insensitive).
+
+ Default: ``yes``
+:ignored-classes:
+ List of classes names for which member attributes should not be checked
+ (useful for classes with attributes dynamically set).
+
+ Default: ``SQLObject``
+:zope:
+ When zope mode is activated, add a predefined set of Zope acquired attributes
+ to generated-members.
+:generated-members:
+ List of members which are set dynamically and missed by pylint inference
+ system, and so shouldn't trigger E0201 when accessed. Python regular
+ expressions are accepted.
+
+ Default: ``REQUEST,acl_users,aq_parent``
+
+Messages
+~~~~~~~~
+:E1101 (no-member): *%s %r has no %r member*
+ Used when a variable is accessed for an unexistent member.
+:E1102 (not-callable): *%s is not callable*
+ Used when an object being called has been inferred to a non callable object
+:E1103 (maybe-no-member): *%s %r has no %r member (but some types could not be inferred)*
+ Used when a variable is accessed for an unexistent member, but astng was not
+ able to interpret all possible types of this variable.
+:E1111 (assignment-from-no-return): *Assigning to function call which doesn't return*
+ Used when an assignment is done on a function call but the inferred function
+ doesn't return anything.
+:E1120 (no-value-for-parameter): *No value passed for parameter %s in function call*
+ Used when a function call passes too few arguments.
+:E1121 (too-many-function-args): *Too many positional arguments for function call*
+ Used when a function call passes too many positional arguments.
+:E1122 (duplicate-keyword-arg): *Duplicate keyword argument %r in function call*
+ Used when a function call passes the same keyword argument multiple times.
+:E1123 (unexpected-keyword-arg): *Passing unexpected keyword argument %r in function call*
+ Used when a function call passes a keyword argument that doesn't correspond to
+ one of the function's parameter names.
+:E1124 (redundant-keyword-arg): *Parameter %r passed as both positional and keyword argument*
+ Used when a function call would result in assigning multiple values to a
+ function parameter, one value from a positional argument and one from a
+ keyword argument.
+:W1111 (assignment-from-none): *Assigning to function call which only returns None*
+ Used when an assignment is done on a function call but the inferred function
+ returns nothing but None.
+
+
diff --git a/examples/pylintrc b/examples/pylintrc
index 046e133..5284fab 100644
--- a/examples/pylintrc
+++ b/examples/pylintrc
@@ -10,8 +10,8 @@
# Profiled execution.
profile=no
-# Add <file or directory> to the black list. It should be a base name, not a
-# path. You may set this option multiple times.
+# Add files or directories to the blacklist. They should be base names, not
+# paths.
ignore=CVS
# Pickle collected data for later comparisons.
@@ -26,25 +26,34 @@ load-plugins=
# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
-# multiple time.
+# multiple time. See also the "--disable" option for examples.
#enable=
# Disable the message, report, category or checker with the given id(s). You
-# can either give multiple identifier separated by comma (,) or put this option
-# multiple time (only on the command line, not in the configuration file where
-# it should appear only once).
+# can either give multiple identifiers separated by comma (,) or put this
+# option multiple times (only on the command line, not in the configuration
+# file where it should appear only once).You can also use "--disable=all" to
+# disable everything first and then reenable specific checks. For example, if
+# you want to run only the similarities checker, you can use "--disable=all
+# --enable=similarities". If you want to run only the classes checker, but have
+# no Warning level messages displayed, use"--disable=all --enable=classes
+# --disable=W"
#disable=
[REPORTS]
# Set the output format. Available formats are text, parseable, colorized, msvs
-# (visual studio) and html
+# (visual studio) and html. You can also give a reporter class, eg
+# mypackage.mymodule.MyReporterClass.
output-format=text
# Include message's id in output
include-ids=no
+# Include symbolic ids of messages in output
+symbols=no
+
# Put messages in a separate file for each module / package specified on the
# command line instead of printing them on stdout. Reports (if any) will be
# written in a file name "pylint_global.[txt|html]".
@@ -78,46 +87,6 @@ max-module-lines=1000
indent-string=' '
-[MISCELLANEOUS]
-
-# List of note tags to take in consideration, separated by a comma.
-notes=FIXME,XXX,TODO
-
-
-[VARIABLES]
-
-# Tells whether we should check for unused import in __init__ files.
-init-import=no
-
-# A regular expression matching the beginning of the name of dummy variables
-# (i.e. not used).
-dummy-variables-rgx=_|dummy
-
-# List of additional names supposed to be defined in builtins. Remember that
-# you should avoid to define new builtins when possible.
-additional-builtins=
-
-
-[TYPECHECK]
-
-# Tells whether missing members accessed in mixin class should be ignored. A
-# mixin class is detected if its name ends with "mixin" (case insensitive).
-ignore-mixin-members=yes
-
-# List of classes names for which member attributes should not be checked
-# (useful for classes with attributes dynamically set).
-ignored-classes=SQLObject
-
-# When zope mode is activated, add a predefined set of Zope acquired attributes
-# to generated-members.
-zope=no
-
-# List of members which are set dynamically and missed by pylint inference
-# system, and so shouldn't trigger E0201 when accessed. Note that regular
-# expressions are accepted (surrounded by quote `"` and followed by a comma `,`)
-generated-members=REQUEST,acl_users,aq_parent,"[a-zA-Z]+_set{1,2}",
-
-
[BASIC]
# Required attributes for module, separated by a comma
@@ -176,6 +145,49 @@ ignore-comments=yes
# Ignore docstrings when computing similarities.
ignore-docstrings=yes
+# Ignore imports when computing similarities.
+ignore-imports=no
+
+
+[MISCELLANEOUS]
+
+# List of note tags to take in consideration, separated by a comma.
+notes=FIXME,XXX,TODO
+
+
+[TYPECHECK]
+
+# Tells whether missing members accessed in mixin class should be ignored. A
+# mixin class is detected if its name ends with "mixin" (case insensitive).
+ignore-mixin-members=yes
+
+# List of classes names for which member attributes should not be checked
+# (useful for classes with attributes dynamically set).
+ignored-classes=SQLObject
+
+# When zope mode is activated, add a predefined set of Zope acquired attributes
+# to generated-members.
+zope=no
+
+# List of members which are set dynamically and missed by pylint inference
+# system, and so shouldn't trigger E0201 when accessed. Python regular
+# expressions are accepted.
+generated-members=REQUEST,acl_users,aq_parent
+
+
+[VARIABLES]
+
+# Tells whether we should check for unused import in __init__ files.
+init-import=no
+
+# A regular expression matching the beginning of the name of dummy variables
+# (i.e. not used).
+dummy-variables-rgx=_|dummy
+
+# List of additional names supposed to be defined in builtins. Remember that
+# you should avoid to define new builtins when possible.
+additional-builtins=
+
[IMPORTS]
@@ -237,3 +249,16 @@ ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions
# List of method names used to declare (i.e. assign) instance attributes.
defining-attr-methods=__init__,__new__,setUp
+
+# List of valid names for the first argument in a class method.
+valid-classmethod-first-arg=cls
+
+# List of valid names for the first argument in a metaclass class method.
+valid-metaclass-classmethod-first-arg=mcs
+
+
+[EXCEPTIONS]
+
+# Exceptions that will emit a warning when being caught. Defaults to
+# "Exception"
+overgeneral-exceptions=Exception
diff --git a/man/pylint.1 b/man/pylint.1
index 29b91d9..b190e68 100644
--- a/man/pylint.1
+++ b/man/pylint.1
@@ -1,4 +1,4 @@
-.TH pylint 1 "2010-11-15" pylint
+.TH pylint 1 "2013-4-16" pylint
.SH NAME
.B pylint
\- python code static checker
@@ -26,6 +26,8 @@ and much more.
Additionally, it is possible to write plugins to add your own checks.
+Pylint is shipped with "pylint-gui", "pyreverse" (UML diagram generator)
+and "symilar" (an independent similarities checker).
.SH OPTIONS
.IP "--version"
@@ -43,7 +45,7 @@ Python code to execute, usually for sys.path manipulation such as pygtk.require(
.IP "--errors-only, -E"
In error mode, checkers without error messages are disabled and for others, only the ERROR messages are displayed, and no reports are done by default
.IP "--ignore=<file>[,<file>...]"
-Add files or directories to the blacklist. They should be base names, not paths.
+Add files or directories to the blacklist. They should be base names, not paths. [current: CVS]
.IP "--persistent=<y_or_n>"
Pickle collected data for later comparisons. [current: yes]
.IP "--load-plugins=<modules>"
@@ -61,15 +63,17 @@ Generate a sample configuration file according to the current configuration. You
.SH MESSAGES CONTROL
.IP "--enable=<msg ids>, -e <msg ids>"
-Enable the message, report, category or checker with the given id(s). You can either give multiple identifier separated by comma (,) or put this option multiple time.
+Enable the message, report, category or checker with the given id(s). You can either give multiple identifier separated by comma (,) or put this option multiple time. See also the "--disable" option for examples.
.IP "--disable=<msg ids>, -d <msg ids>"
-Disable the message, report, category or checker with the given id(s). You can either give multiple identifier separated by comma (,) or put this option multiple time (only on the command line, not in the configuration file where it should appear only once).
+Disable the message, report, category or checker with the given id(s). You can either give multiple identifiers separated by comma (,) or put this option multiple times (only on the command line, not in the configuration file where it should appear only once).You can also use "--disable=all" to disable everything first and then reenable specific checks. For example, if you want to run only the similarities checker, you can use "--disable=all --enable=similarities". If you want to run only the classes checker, but have no Warning level messages displayed, use"--disable=all --enable=classes --disable=W"
.SH REPORTS
.IP "--output-format=<format>, -f <format>"
-Set the output format. Available formats are text, parseable, colorized, msvs (visual studio) and html [current: text]
+Set the output format. Available formats are text, parseable, colorized, msvs (visual studio) and html. You can also give a reporter class, eg mypackage.mymodule.MyReporterClass. [current: text]
.IP "--include-ids=<y_or_n>, -i <y_or_n>"
Include message's id in output [current: no]
+.IP "--symbols=<y_or_n>, -s <y_or_n>"
+Include symbolic ids of messages in output [current: no]
.IP "--files-output=<y_or_n>"
Put messages in a separate file for each module / package specified on the command line instead of printing them on stdout. Reports (if any) will be written in a file name "pylint_global.[txt|html]". [current: no]
.IP "--reports=<y_or_n>, -r <y_or_n>"
@@ -79,14 +83,6 @@ Python expression which should return a note less than 10 (10 is the highest not
.IP "--comment=<y_or_n>"
Add a comment according to your evaluation note. This is used by the global evaluation report (RP0004). [current: no]
-.SH FORMAT
-.IP "--max-line-length=<int>"
-Maximum number of characters on a single line. [current: 80]
-.IP "--max-module-lines=<int>"
-Maximum number of lines in a module [current: 1000]
-.IP "--indent-string=<string>"
-String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 tab). [current: ' ']
-
.SH IMPORTS
.IP "--deprecated-modules=<modules>"
Deprecated modules which should not be used, separated by a comma [current: regsub,string,TERMIOS,Bastion,rexec]
@@ -119,27 +115,13 @@ Minimum number of public methods for a class (see R0903). [current: 2]
.IP "--max-public-methods=<num>"
Maximum number of public methods for a class (see R0904). [current: 20]
-.SH MISCELLANEOUS
-.IP "--notes=<comma separated values>"
-List of note tags to take in consideration, separated by a comma. [current: FIXME,XXX,TODO]
-
-.SH VARIABLES
-.IP "--init-import=<y_or_n>"
-Tells whether we should check for unused import in __init__ files. [current: no]
-.IP "--dummy-variables-rgx=<regexp>"
-A regular expression matching the beginning of the name of dummy variables (i.e. not used). [current: _|dummy]
-.IP "--additional-builtins=<comma separated list>"
-List of additional names supposed to be defined in builtins. Remember that you should avoid to define new builtins when possible. [current: none]
-
-.SH TYPECHECK
-.IP "--ignore-mixin-members=<y_or_n>"
-Tells whether missing members accessed in mixin class should be ignored. A mixin class is detected if its name ends with "mixin" (case insensitive). [current: yes]
-.IP "--ignored-classes=<members names>"
-List of classes names for which member attributes should not be checked (useful for classes with attributes dynamically set). [current: SQLObject]
-.IP "--zope=<y_or_n>"
-When zope mode is activated, add a predefined set of Zope acquired attributes to generated-members. [current: no]
-.IP "--generated-members=<members names>"
-List of members which are set dynamically and missed by pylint inference system, and so shouldn't trigger E0201 when accessed. [current: REQUEST,acl_users,aq_parent]
+.SH FORMAT
+.IP "--max-line-length=<int>"
+Maximum number of characters on a single line. [current: 80]
+.IP "--max-module-lines=<int>"
+Maximum number of lines in a module [current: 1000]
+.IP "--indent-string=<string>"
+String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 tab). [current: ' ']
.SH BASIC
.IP "--required-attributes=<attributes>"
@@ -178,26 +160,57 @@ Minimum lines number of a similarity. [current: 4]
Ignore comments when computing similarities. [current: yes]
.IP "--ignore-docstrings=<y or n>"
Ignore docstrings when computing similarities. [current: yes]
+.IP "--ignore-imports=<y or n>"
+Ignore imports when computing similarities. [current: no]
+
+.SH MISCELLANEOUS
+.IP "--notes=<comma separated values>"
+List of note tags to take in consideration, separated by a comma. [current: FIXME,XXX,TODO]
+
+.SH TYPECHECK
+.IP "--ignore-mixin-members=<y_or_n>"
+Tells whether missing members accessed in mixin class should be ignored. A mixin class is detected if its name ends with "mixin" (case insensitive). [current: yes]
+.IP "--ignored-classes=<members names>"
+List of classes names for which member attributes should not be checked (useful for classes with attributes dynamically set). [current: SQLObject]
+.IP "--zope=<y_or_n>"
+When zope mode is activated, add a predefined set of Zope acquired attributes to generated-members. [current: no]
+.IP "--generated-members=<members names>"
+List of members which are set dynamically and missed by pylint inference system, and so shouldn't trigger E0201 when accessed. Python regular expressions are accepted. [current: REQUEST,acl_users,aq_parent]
+
+.SH VARIABLES
+.IP "--init-import=<y_or_n>"
+Tells whether we should check for unused import in __init__ files. [current: no]
+.IP "--dummy-variables-rgx=<regexp>"
+A regular expression matching the beginning of the name of dummy variables (i.e. not used). [current: _|dummy]
+.IP "--additional-builtins=<comma separated list>"
+List of additional names supposed to be defined in builtins. Remember that you should avoid to define new builtins when possible. [current: none]
.SH CLASSES
.IP "--ignore-iface-methods=<method names>"
List of interface methods to ignore, separated by a comma. This is used for instance to not check methods defines in Zope's Interface base class. [current: isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by]
.IP "--defining-attr-methods=<method names>"
List of method names used to declare (i.e. assign) instance attributes. [current: __init__,__new__,setUp]
+.IP "--valid-classmethod-first-arg=<argument names>"
+List of valid names for the first argument in a class method. [current: cls]
+.IP "--valid-metaclass-classmethod-first-arg=<argument names>"
+List of valid names for the first argument in a metaclass class method. [current: mcs]
+
+.SH EXCEPTIONS
+.IP "--overgeneral-exceptions=<comma-separated class names>"
+Exceptions that will emit a warning when being caught. Defaults to "Exception" [current: Exception]
.SH ENVIRONMENT VARIABLES
-The following environment variables are used :
- * PYLINTHOME
- path to the directory where data of persistent run will be stored. If not
-found, it defaults to ~/.pylint.d/ or .pylint.d (in the current working
-directory).
- * PYLINTRC
- path to the configuration file. If not found, it will use the first
-existent file in ~/.pylintrc, /etc/pylintrc.
+The following environment variables are used:
+ * PYLINTHOME
+ path to the directory where data of persistent run will be stored. If not
+found, it defaults to ~/.pylint.d/ or .pylint.d (in the current working
+directory).
+ * PYLINTRC
+ path to the configuration file. If not found, it will use the first
+existing file among (~/.pylintrc, /etc/pylintrc).
.SH OUTPUT
-
Using the default text output, the message format is :
MESSAGE_TYPE: LINE_NUM:[OBJECT:] MESSAGE
@@ -209,9 +222,8 @@ There are 5 kind of message types :
* (E) error, for probable bugs in the code
* (F) fatal, if an error occurred which prevented pylint from doing further
processing.
-
-.SH OUTPUT STATUS CODE
+.SH OUTPUT STATUS CODE
Pylint should leave with following status code:
* 0 if everything went fine
* 1 if a fatal message was issued
@@ -223,13 +235,10 @@ Pylint should leave with following status code:
status 1 to 16 will be bit-ORed so you can know which different categories has
been issued by analysing pylint output status code
-
+
.SH SEE ALSO
/usr/share/doc/pythonX.Y-pylint/
-.SH COPYRIGHT
-Logilab S.A.
-
.SH BUGS
Please report bugs on the project's mailing list:
mailto://python-projects@lists.logilab.org
@@ -237,3 +246,6 @@ mailto://python-projects@lists.logilab.org
.SH AUTHOR
Logilab <python-projects@lists.logilab.org>
+.SH COPYRIGHT
+Logilab S.A.
+