summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Nowikowski <godfryd@gmail.com>2014-11-04 08:08:19 +0100
committerMichal Nowikowski <godfryd@gmail.com>2014-11-04 08:08:19 +0100
commitad731e78eecc677e85bbe80d89a7cdf87fbd7922 (patch)
treed04f0f6ddbdb5acb1f6262a3927ccad9f4ceeb5f
parentf1903892112cf7e8ed588c41484c91b9111bb28b (diff)
downloadpylint-docs-improvements-2.tar.gz
Documentation improvementsdocs-improvements-2
- added intros to features page, - fixed PyLint to Pylint in text, - improved ide-integration doc page, - updated pylintrc in examples and - regenerated pylint manual
-rw-r--r--ChangeLog2
-rw-r--r--Makefile2
-rw-r--r--checkers/classes.py4
-rw-r--r--checkers/newstyle.py2
-rw-r--r--checkers/variables.py2
-rw-r--r--doc/ide-integration.rst36
-rw-r--r--doc/options.rst10
-rw-r--r--examples/pylintrc171
-rw-r--r--interfaces.py2
-rw-r--r--lint.py2
-rw-r--r--man/pylint.1138
-rw-r--r--utils.py55
12 files changed, 249 insertions, 177 deletions
diff --git a/ChangeLog b/ChangeLog
index 0ef5c07..b753419 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -166,7 +166,7 @@ ChangeLog for Pylint
* Allow hanging continued indentation for implicitly concatenated
strings. Closes issue #232.
- * PyLint works under Python 2.5 again, and its test suite passes.
+ * Pylint works under Python 2.5 again, and its test suite passes.
* Fix some false positives for the cellvar-from-loop warnings.
Closes issue #233.
diff --git a/Makefile b/Makefile
index b566c2b..daf2bff 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# Makefile for handling various tasks of PyLint sources
+# Makefile for handling various tasks of Pylint sources
PYVE=pyve
PIP=$(PYVE)/bin/pip
TOX=$(PYVE)/bin/tox
diff --git a/checkers/classes.py b/checkers/classes.py
index 3be5bd7..14aa90f 100644
--- a/checkers/classes.py
+++ b/checkers/classes.py
@@ -106,7 +106,7 @@ def _is_attribute_property(name, klass):
MSGS = {
'F0202': ('Unable to check methods signature (%s / %s)',
'method-check-failed',
- 'Used when PyLint has been unable to check methods signature \
+ '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.'),
@@ -193,7 +193,7 @@ MSGS = {
),
'F0220': ('failed to resolve interfaces implemented by %s (%s)', # W0224
'unresolved-interface',
- 'Used when a PyLint as failed to find interfaces implemented by \
+ 'Used when a Pylint as failed to find interfaces implemented by \
a class'),
diff --git a/checkers/newstyle.py b/checkers/newstyle.py
index 335b052..4fae401 100644
--- a/checkers/newstyle.py
+++ b/checkers/newstyle.py
@@ -43,7 +43,7 @@ MSGS = {
{'maxversion': (3, 0)}),
'W1001': ('Use of "property" on an old style class',
'property-on-old-class',
- 'Used when PyLint detect the use of the builtin "property" \
+ 'Used when Pylint detect the use of the builtin "property" \
on an old style class while this is relying on new style \
classes features.',
{'maxversion': (3, 0)}),
diff --git a/checkers/variables.py b/checkers/variables.py
index b5ea34f..4420356 100644
--- a/checkers/variables.py
+++ b/checkers/variables.py
@@ -201,7 +201,7 @@ MSGS = {
'W0603': ('Using the global statement', # W0121
'global-statement',
'Used when you use the "global" statement to update a global \
- variable. PyLint just try to discourage this \
+ 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', # W0103
'global-at-module-level',
diff --git a/doc/ide-integration.rst b/doc/ide-integration.rst
index de5116c..7507fb1 100644
--- a/doc/ide-integration.rst
+++ b/doc/ide-integration.rst
@@ -3,35 +3,33 @@
IDE integration
=================
-To use Pylint with Emacs, see http://www.emacswiki.org/emacs/PythonProgrammingInEmacs#toc8
+To use Pylint with:
-To use Pylint with Vim, see
-http://www.vim.org/scripts/script.php?script_id=891
+ - Emacs_, see http://www.emacswiki.org/emacs/PythonProgrammingInEmacs#toc8,
+ - Vim_, see http://www.vim.org/scripts/script.php?script_id=891,
+ - Eclipse_ and PyDev_, see http://pydev.org/manual_adv_pylint.html,
+ - Komodo_, see http://mateusz.loskot.net/posts/2006/01/15/running-pylint-from-komodo/,
+ - gedit_, see https://launchpad.net/gedit-pylint-2 or https://wiki.gnome.org/Apps/Gedit/PylintPlugin,
+ - WingIDE_, see http://www.wingware.com/doc/edit/pylint,
+ - PyCharm_, see http://blog.saturnlaboratories.co.za/archive/2012/09/10/running-pylint-pycharm.
-To use Pylint with Eclipse, see http://pydev.org
+Pylint is integrated in:
-To use Pylint with Komodo_, see
-http://mateusz.loskot.net/2006/01/15/running-pylint-from-komodo/
-
-To use Pylint with gedit_, see
-http://live.gnome.org/Gedit/PylintPlugin
-
-To use Pylint with WingIDE_, see
-http://www.wingware.com/doc/edit/pylint
-
-Pylint is integrated in Eric_ IDE, see the `Project > Check` menu.
-
-Pylint is integrated in Spyder_, see http://packages.python.org/spyder/pylint.html
-
-Pylint is integrated in pyscripter_, see the `Tool -> Tools` menu.
+ - Eric_ IDE, see the `Project > Check` menu,
+ - Spyder_, see http://packages.python.org/spyder/pylint.html,
+ - pyscripter_, see the `Tool -> Tools` menu.
+.. _Emacs: http://www.gnu.org/software/emacs/
+.. _Vim: http://www.vim.org/
+.. _Eclipse: https://www.eclipse.org/
.. _Eric: http://eric-ide.python-projects.org/
.. _pyscripter: http://code.google.com/p/pyscripter/
.. _pydev: http://pydev.org
.. _Komodo: http://www.activestate.com/Products/Komodo/
-.. _gedit: http://www.gnome.org/projects/gedit/
+.. _gedit: https://wiki.gnome.org/Apps/Gedit
.. _WingIDE: http://www.wingware.com/
.. _spyder: http://code.google.com/p/spyderlib/
+.. _PyCharm: http://www.jetbrains.com/pycharm/
Using Pylint thru flymake in Emacs
==================================
diff --git a/doc/options.rst b/doc/options.rst
index 702d93c..d005dd2 100644
--- a/doc/options.rst
+++ b/doc/options.rst
@@ -1,13 +1,13 @@
.. -*- coding: utf-8 -*-
===============
- Configuration
+ Configuration
===============
Naming Styles
-------------
-PyLint recognizes a number of different name types internally. With a few
+Pylint recognizes a number of different name types internally. With a few
exceptions, the type of the name is governed by the location the assignment to a
name is found in, and not the type of object assigned.
@@ -88,10 +88,10 @@ Large code bases that have been worked on for multiple years often exhibit an
evolution in style as well. In some cases, modules can be in the same package,
but still have different naming style based on the stratum they belong to.
However, intra-module consistency should still be required, to make changes
-inside a single file easier. For this case, PyLint supports regular expression
-with several named capturing group.
+inside a single file easier. For this case, Pylint supports regular expression
+with several named capturing group.
-Rather than emitting name warnings immediately, PyLint will determine the
+Rather than emitting name warnings immediately, Pylint will determine the
prevalent naming style inside each module and enforce it on all names.
Consider the following (simplified) example::
diff --git a/examples/pylintrc b/examples/pylintrc
index 5f21f58..69f0ee1 100644
--- a/examples/pylintrc
+++ b/examples/pylintrc
@@ -12,7 +12,7 @@ profile=no
# Add files or directories to the blacklist. They should be base names, not
# paths.
-ignore=.hg,test
+ignore=CVS
# Pickle collected data for later comparisons.
persistent=yes
@@ -27,9 +27,16 @@ include-ids=no
# DEPRECATED
symbols=no
+# Use multiple processes to speed up Pylint.
+jobs=1
+
[MESSAGES CONTROL]
+# Only show warnings with the listed confidence levels. Leave empty to show
+# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
+confidence=
+
# 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.
@@ -85,30 +92,22 @@ comment=no
logging-modules=logging
-[FORMAT]
-
-# Maximum number of characters on a single line.
-max-line-length=80
-
-# Regexp for a line that is allowed to be longer than the limit.
-ignore-long-lines=^\s*(# )?<?https?://\S+>?$
-
-# Allow the body of an if to be on the same line as the test if there is no
-# else.
-single-line-if-stmt=no
+[VARIABLES]
-# List of optional constructs for which whitespace checking is disabled
-no-space-check=trailing-comma,dict-separator
+# Tells whether we should check for unused import in __init__ files.
+init-import=no
-# Maximum number of lines in a module
-max-module-lines=1000
+# A regular expression matching the name of dummy variables (i.e. expectedly
+# not used).
+dummy-variables-rgx=_$|dummy
-# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
-# tab).
-indent-string=' '
+# List of additional names supposed to be defined in builtins. Remember that
+# you should avoid to define new builtins when possible.
+additional-builtins=
-# Number of spaces of indent required inside a hanging or continued line.
-indent-after-paren=4
+# List of strings which can identify a callback function by name. A callback
+# name must start or end with one of those strings.
+callbacks=cb_,_cb
[BASIC]
@@ -117,7 +116,7 @@ indent-after-paren=4
required-attributes=
# List of builtins function names that should not be used, separated by a comma
-bad-functions=map,filter,apply,input
+bad-functions=map,filter,input
# Good variable names which should always be accepted, separated by a comma
good-names=i,j,k,ex,Run,_
@@ -201,21 +200,6 @@ no-docstring-rgx=__.*__
docstring-min-length=-1
-[SIMILARITIES]
-
-# Minimum lines number of a similarity.
-min-similarity-lines=4
-
-# Ignore comments when computing similarities.
-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.
@@ -247,36 +231,85 @@ zope=no
generated-members=REQUEST,acl_users,aq_parent
-[VARIABLES]
+[SPELLING]
-# Tells whether we should check for unused import in __init__ files.
-init-import=no
+# Spelling dictionary name. Available dictionaries: none. To make it working
+# install python-enchant package.
+spelling-dict=
-# A regular expression matching the name of dummy variables (i.e. expectedly
-# not used).
-dummy-variables-rgx=_|dummy
+# List of comma separated words that should not be checked.
+spelling-ignore-words=
-# List of additional names supposed to be defined in builtins. Remember that
-# you should avoid to define new builtins when possible.
-additional-builtins=
+# A path to a file that contains private dictionary; one word per line.
+spelling-private-dict-file=
+# Tells whether to store unknown words to indicated private dictionary in
+# --spelling-private-dict-file option instead of raising a message.
+spelling-store-unknown-words=no
-[IMPORTS]
-# Deprecated modules which should not be used, separated by a comma
-deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
+[FORMAT]
-# Create a graph of every (i.e. internal and external) dependencies in the
-# given file (report RP0402 must not be disabled)
-import-graph=
+# Maximum number of characters on a single line.
+max-line-length=80
-# Create a graph of external dependencies in the given file (report RP0402 must
-# not be disabled)
-ext-import-graph=
+# Regexp for a line that is allowed to be longer than the limit.
+ignore-long-lines=^\s*(# )?<?https?://\S+>?$
-# Create a graph of internal dependencies in the given file (report RP0402 must
-# not be disabled)
-int-import-graph=
+# Allow the body of an if to be on the same line as the test if there is no
+# else.
+single-line-if-stmt=no
+
+# List of optional constructs for which whitespace checking is disabled
+no-space-check=trailing-comma,dict-separator
+
+# Maximum number of lines in a module
+max-module-lines=1000
+
+# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
+# tab).
+indent-string=' '
+
+# Number of spaces of indent required inside a hanging or continued line.
+indent-after-paren=4
+
+# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
+expected-line-ending-format=
+
+
+[SIMILARITIES]
+
+# Minimum lines number of a similarity.
+min-similarity-lines=4
+
+# Ignore comments when computing similarities.
+ignore-comments=yes
+
+# Ignore docstrings when computing similarities.
+ignore-docstrings=yes
+
+# Ignore imports when computing similarities.
+ignore-imports=no
+
+
+[CLASSES]
+
+# 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.
+ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
+
+# 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
+
+# List of member names, which should be excluded from the protected access
+# warning.
+exclude-protected=_asdict,_fields,_replace,_source,_make
[DESIGN]
@@ -313,20 +346,22 @@ min-public-methods=2
max-public-methods=20
-[CLASSES]
+[IMPORTS]
-# 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.
-ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
+# Deprecated modules which should not be used, separated by a comma
+deprecated-modules=regsub,TERMIOS,Bastion,rexec
-# List of method names used to declare (i.e. assign) instance attributes.
-defining-attr-methods=__init__,__new__,setUp
+# Create a graph of every (i.e. internal and external) dependencies in the
+# given file (report RP0402 must not be disabled)
+import-graph=
-# List of valid names for the first argument in a class method.
-valid-classmethod-first-arg=cls
+# Create a graph of external dependencies in the given file (report RP0402 must
+# not be disabled)
+ext-import-graph=
-# List of valid names for the first argument in a metaclass class method.
-valid-metaclass-classmethod-first-arg=mcs
+# Create a graph of internal dependencies in the given file (report RP0402 must
+# not be disabled)
+int-import-graph=
[EXCEPTIONS]
diff --git a/interfaces.py b/interfaces.py
index ea3b40f..067aaa6 100644
--- a/interfaces.py
+++ b/interfaces.py
@@ -10,7 +10,7 @@
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-"""Interfaces for PyLint objects"""
+"""Interfaces for Pylint objects"""
from collections import namedtuple
from logilab.common.interface import Interface
diff --git a/lint.py b/lint.py
index 9ef818f..b82ae04 100644
--- a/lint.py
+++ b/lint.py
@@ -349,7 +349,7 @@ class PyLinter(OptionsManagerMixIn, MessagesHandlerMixIn, ReportsHandlerMixIn,
{'type' : 'int', 'metavar': '<n-processes>',
'short': 'j',
'default': 1,
- 'help' : '''Use multiple processes to speed up PyLint.''',
+ 'help' : '''Use multiple processes to speed up Pylint.''',
}), # jobs
)
diff --git a/man/pylint.1 b/man/pylint.1
index 57954c8..3a5c3e9 100644
--- a/man/pylint.1
+++ b/man/pylint.1
@@ -1,4 +1,4 @@
-.TH pylint 1 "2014-7-25" pylint
+.TH pylint 1 "2014-11-4" pylint
.SH NAME
.B pylint
\- python code static checker
@@ -45,23 +45,29 @@ 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. [current: .hg,test]
+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>"
List of plugins (as comma separated values of python modules names) to load, usually to register additional checkers. [current: none]
+.IP "--jobs=<n-processes>, -j <n-processes>"
+Use multiple processes to speed up Pylint. [current: 1]
.SH COMMANDS
.IP "--help-msg=<msg-id>"
Display a help message for the given message id and exit. The value may be a comma separated list of message ids.
.IP "--list-msgs"
Generate pylint's messages.
+.IP "--list-conf-levels"
+Generate pylint's messages.
.IP "--full-documentation"
Generate pylint's full documentation.
.IP "--generate-rcfile"
Generate a sample configuration file according to the current configuration. You can put other options before this one to get them in the generated configuration.
.SH MESSAGES CONTROL
+.IP "--confidence=<levels>"
+Only show warnings with the listed confidence levels. Leave empty to show all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED [current: none]
.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. See also the "--disable" option for examples.
.IP "--disable=<msg ids>, -d <msg ids>"
@@ -81,20 +87,36 @@ Add a comment according to your evaluation note. This is used by the global eval
.IP "--msg-template=<template>"
Template used to display messages. This is a python new-style format string used to format the message information. See doc for all details
-.SH IMPORTS
-.IP "--deprecated-modules=<modules>"
-Deprecated modules which should not be used, separated by a comma [current: regsub,string,TERMIOS,Bastion,rexec]
-.IP "--import-graph=<file.dot>"
-Create a graph of every (i.e. internal and external) dependencies in the given file (report RP0402 must not be disabled) [current: none]
-.IP "--ext-import-graph=<file.dot>"
-Create a graph of external dependencies in the given file (report RP0402 must not be disabled) [current: none]
-.IP "--int-import-graph=<file.dot>"
-Create a graph of internal dependencies in the given file (report RP0402 must not be disabled) [current: none]
+.SH EXCEPTIONS
+.IP "--overgeneral-exceptions=<comma-separated class names>"
+Exceptions that will emit a warning when being caught. Defaults to "Exception" [current: Exception]
+
+.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]
+.IP "--exclude-protected=<protected access exclusions>"
+List of member names, which should be excluded from the protected access warning. [current: _asdict,_fields,_replace,_source,_make]
.SH LOGGING
.IP "--logging-modules=<comma separated list>"
Logging modules to check that the string format arguments are in logging function parameter format [current: logging]
+.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 name of dummy variables (i.e. expectedly 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]
+.IP "--callbacks=<callbacks>"
+List of strings which can identify a callback function by name. A callback name must start or end with one of those strings. [current: cb_,_cb]
+
.SH DESIGN
.IP "--max-args=<int>"
Maximum number of arguments for function / method [current: 5]
@@ -117,27 +139,11 @@ 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 FORMAT
-.IP "--max-line-length=<int>"
-Maximum number of characters on a single line. [current: 80]
-.IP "--ignore-long-lines=<regexp>"
-Regexp for a line that is allowed to be longer than the limit. [current: ^\s*(# )?<?https?://\S+>?$]
-.IP "--single-line-if-stmt=<y_or_n>"
-Allow the body of an if to be on the same line as the test if there is no else. [current: no]
-.IP "--no-space-check=NO_SPACE_CHECK"
-List of optional constructs for which whitespace checking is disabled [current: trailing-comma,dict-separator]
-.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: ' ']
-.IP "--indent-after-paren=<int>"
-Number of spaces of indent required inside a hanging or continued line. [current: 4]
-
.SH BASIC
.IP "--required-attributes=<attributes>"
Required attributes for module, separated by a comma [current: none]
.IP "--bad-functions=<builtin function names>"
-List of builtins function names that should not be used, separated by a comma [current: map,filter,apply,input]
+List of builtins function names that should not be used, separated by a comma [current: map,filter,input]
.IP "--good-names=<names>"
Good variable names which should always be accepted, separated by a comma [current: i,j,k,ex,Run,_]
.IP "--bad-names=<names>"
@@ -191,20 +197,6 @@ Regular expression which should only match function or class names that do not r
.IP "--docstring-min-length=<int>"
Minimum line length for functions/classes that require docstrings, shorter ones are exempt. [current: -1]
-.SH EXCEPTIONS
-.IP "--overgeneral-exceptions=<comma-separated class names>"
-Exceptions that will emit a warning when being caught. Defaults to "Exception" [current: Exception]
-
-.SH SIMILARITIES
-.IP "--min-similarity-lines=<int>"
-Minimum lines number of a similarity. [current: 4]
-.IP "--ignore-comments=<y or n>"
-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]
@@ -221,23 +213,53 @@ When zope mode is activated, add a predefined set of Zope acquired attributes to
.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 name of dummy variables (i.e. expectedly 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 SPELLING
+.IP "--spelling-dict=<dict name>"
+Spelling dictionary name. Available dictionaries: none. To make it working install python-enchant package. [current: none]
+.IP "--spelling-ignore-words=<comma separated words>"
+List of comma separated words that should not be checked. [current: none]
+.IP "--spelling-private-dict-file=<path to file>"
+A path to a file that contains private dictionary; one word per line. [current: none]
+.IP "--spelling-store-unknown-words=<y_or_n>"
+Tells whether to store unknown words to indicated private dictionary in --spelling-private-dict-file option instead of raising a message. [current: no]
-.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 FORMAT
+.IP "--max-line-length=<int>"
+Maximum number of characters on a single line. [current: 80]
+.IP "--ignore-long-lines=<regexp>"
+Regexp for a line that is allowed to be longer than the limit. [current: ^\s*(# )?<?https?://\S+>?$]
+.IP "--single-line-if-stmt=<y_or_n>"
+Allow the body of an if to be on the same line as the test if there is no else. [current: no]
+.IP "--no-space-check=NO_SPACE_CHECK"
+List of optional constructs for which whitespace checking is disabled [current: trailing-comma,dict-separator]
+.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: ' ']
+.IP "--indent-after-paren=<int>"
+Number of spaces of indent required inside a hanging or continued line. [current: 4]
+.IP "--expected-line-ending-format=<empty or LF or CRLF>"
+Expected format of line ending, e.g. empty (any line ending), LF or CRLF. [current: none]
+
+.SH IMPORTS
+.IP "--deprecated-modules=<modules>"
+Deprecated modules which should not be used, separated by a comma [current: regsub,TERMIOS,Bastion,rexec]
+.IP "--import-graph=<file.dot>"
+Create a graph of every (i.e. internal and external) dependencies in the given file (report RP0402 must not be disabled) [current: none]
+.IP "--ext-import-graph=<file.dot>"
+Create a graph of external dependencies in the given file (report RP0402 must not be disabled) [current: none]
+.IP "--int-import-graph=<file.dot>"
+Create a graph of internal dependencies in the given file (report RP0402 must not be disabled) [current: none]
+
+.SH SIMILARITIES
+.IP "--min-similarity-lines=<int>"
+Minimum lines number of a similarity. [current: 4]
+.IP "--ignore-comments=<y or n>"
+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 ENVIRONMENT VARIABLES
diff --git a/utils.py b/utils.py
index bacb75b..62bd7e6 100644
--- a/utils.py
+++ b/utils.py
@@ -99,7 +99,7 @@ class Message(_MsgBase):
self.abspath,
self.path,
self.module,
- self.obj,
+ self.obj,
self.line,
self.column)
return (self.msg_id, self.symbol, location, self.msg, self.confidence)
@@ -413,12 +413,15 @@ class MessagesHandlerMixIn(object):
def print_full_documentation(self):
"""output a full documentation in ReST format"""
+ print("Pylint global options and switches")
+ print("----------------------------------")
+ print("")
+ print("Pylint provides global options and switches.")
+ print("")
+
by_checker = {}
for checker in self.get_checkers():
if checker.name == 'master':
- prefix = 'Main '
- print("Options")
- print('-------\n')
if checker.options:
for section, options in checker.options_by_section():
if section is None:
@@ -428,7 +431,7 @@ class MessagesHandlerMixIn(object):
print(title)
print('~' * len(title))
rest_format_section(sys.stdout, None, options)
- print()
+ print("")
else:
try:
by_checker[checker.name][0] += checker.options_and_values()
@@ -438,35 +441,49 @@ class MessagesHandlerMixIn(object):
by_checker[checker.name] = [list(checker.options_and_values()),
dict(checker.msgs),
list(checker.reports)]
+
+ print("Pylint checkers' options and switches")
+ print("-------------------------------------")
+ print("")
+ print("Pylint checkers can provide three set of features:")
+ print("")
+ print("* options that control their execution,")
+ print("* messages that they can raise,")
+ print("* reports that they can generate.")
+ print("")
+ print("Below is a list of all checkers and their features.")
+ print("")
+
for checker, (options, msgs, reports) in six.iteritems(by_checker):
- prefix = ''
- title = '%s checker' % checker
+ title = '%s checker' % (checker.replace("_", " ").title())
print(title)
- print('-' * len(title))
- print()
+ print('~' * len(title))
+ print("")
+ print("Verbatim name of the checker is ``%s``." % checker)
+ print("")
if options:
title = 'Options'
print(title)
- print('~' * len(title))
+ print('^' * len(title))
rest_format_section(sys.stdout, None, options)
- print()
+ print("")
if msgs:
- title = ('%smessages' % prefix).capitalize()
+ title = 'Messages'
print(title)
print('~' * len(title))
for msgid, msg in sorted(six.iteritems(msgs),
key=lambda kv: (_MSG_ORDER.index(kv[0][0]), kv[1])):
msg = build_message_def(checker, msgid, msg)
print(msg.format_help(checkerref=False))
- print()
+ print("")
if reports:
- title = ('%sreports' % prefix).capitalize()
+ title = 'Reports'
print(title)
print('~' * len(title))
for report in reports:
print(':%s: %s' % report[:2])
- print()
- print()
+ print("")
+ print("")
class FileState(object):
@@ -664,10 +681,10 @@ class MessagesStore(object):
for msgid in msgids:
try:
print(self.check_message_id(msgid).format_help(checkerref=True))
- print()
+ print("")
except UnknownMessage as ex:
print(ex)
- print()
+ print("")
continue
def list_messages(self):
@@ -677,7 +694,7 @@ class MessagesStore(object):
if not msg.may_be_emitted():
continue
print(msg.format_help(checkerref=False))
- print()
+ print("")
class ReportsHandlerMixIn(object):