summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile5
-rw-r--r--doc/changelog.rst8
-rw-r--r--doc/contribute.rst6
-rw-r--r--doc/extend.rst7
-rw-r--r--doc/faq.rst77
-rw-r--r--doc/ide-integration.rst39
-rw-r--r--doc/index.rst3
-rw-r--r--doc/installation.rst2
-rw-r--r--doc/make.bat190
-rw-r--r--doc/message-control.rst2
-rw-r--r--doc/options.rst10
-rw-r--r--doc/output.rst5
-rw-r--r--doc/release.txt23
-rw-r--r--doc/run.rst46
14 files changed, 331 insertions, 92 deletions
diff --git a/doc/Makefile b/doc/Makefile
index 98076a6..2cd7f7e 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -6,13 +6,14 @@ SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
+PYTHONPATH =
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
-.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest all
help:
@echo "Please use \`make <target>' where <target> is one of"
@@ -138,7 +139,7 @@ features:
echo "" >> features.rst
echo ".. generated by pylint --full-documentation" >> features.rst
echo "" >> features.rst
- pylint --full-documentation >> features.rst
+ PYTHONPATH=$(PYTHONPATH) pylint --full-documentation >> features.rst
gen-examples:
chmod u+w ../examples/pylintrc
diff --git a/doc/changelog.rst b/doc/changelog.rst
new file mode 100644
index 0000000..b4a8e39
--- /dev/null
+++ b/doc/changelog.rst
@@ -0,0 +1,8 @@
+
+Changes & Contributors
+======================
+
+.. include:: ../ChangeLog
+
+
+.. include:: ../CONTRIBUTORS.txt
diff --git a/doc/contribute.rst b/doc/contribute.rst
index 6a45dea..43e5dfb 100644
--- a/doc/contribute.rst
+++ b/doc/contribute.rst
@@ -47,7 +47,7 @@ http://lists.logilab.org/pipermail/python-projects/
Forge
-----
-Pylint is developped using the mercurial_ distributed version control system.
+Pylint is developed using the mercurial_ distributed version control system.
You can clone Pylint and its dependencies from ::
@@ -64,7 +64,7 @@ your patch gets accepted.
- Pylint keeps a set of unit tests in the /test directory. The
`test_func.py` module uses external files to have some kind of easy
- functionnal testing. To get your patch accepted you must write (or change)
+ functional testing. To get your patch accepted you must write (or change)
a test input file in the `test/input` directory and message file in the
`test/messages` directory. Then run `python test_func.py` to ensure that
your test is green.
@@ -117,7 +117,7 @@ without installing them. You can run all the unit tests like so::
The -S flag keeps distutils from interfering with sys.path. YMMV.
-Adding new functionnal tests
+Adding new functional tests
----------------------------
Pylint comes with an easy way to write functional tests for new checks:
diff --git a/doc/extend.rst b/doc/extend.rst
index 476c994..b767852 100644
--- a/doc/extend.rst
+++ b/doc/extend.rst
@@ -8,7 +8,8 @@ You can find some simple examples in the examples
directory of the distribution (custom.py and custom_raw.py). I'll try to
quickly explain the essentials here.
-First, there are two kinds of checkers :
+First, there are two kinds of checkers:
+
* raw checkers, which are analysing each module as a raw file stream
* ast checkers, which are working on an ast representation of the module
@@ -25,8 +26,8 @@ Checkers are ordered by priority. For each module, Pylint's engine:
1. give the module source file as a stream to raw checkers
2. get an ast representation for the module
-3. make a depth first descent of the tree, calling visit_<> on each AST
- checker when entering a node, and living_<> on the back traversal
+3. make a depth first descent of the tree, calling ``visit_<>`` on each AST
+ checker when entering a node, and ``leave_<>`` on the back traversal
Notice that the source code is probably the best source of
documentation, it should be clear and well documented. Don't hesitate to
diff --git a/doc/faq.rst b/doc/faq.rst
index e3cd73e..2f7dfbb 100644
--- a/doc/faq.rst
+++ b/doc/faq.rst
@@ -1,5 +1,7 @@
.. -*- coding: utf-8 -*-
+.. _faq:
+
==========================
Frequently Asked Questions
==========================
@@ -65,11 +67,23 @@ Pylint from the repository, simply invoke ::
-----------------------------------
Pylint requires the latest `astroid`_ and `logilab-common`_ packages. It should be
-compatible with any Python version greater than 2.5.0.
+compatible with any Python version greater than 2.7.0.
.. _`astroid`: https://bitbucket.org/logilab/astroid
.. _`logilab-common`: http://www.logilab.org/project/logilab-common
+2.4 What versions of Python is Pylint supporting?
+--------------------------------------------------
+
+Since Pylint 1.4, we support only Python 2.7+ and Python 3.3+.
+Using this strategy really helps in maintaining a code base compatible
+with both versions and from this benefits not only the maintainers,
+but the end users as well, because it's easier to add and test
+new features.
+If support for Python 2.6 is absolutely required, then the version
+from pylint-1.3 branch can be used. It will receive backports of
+bug fixes for a while.
+
3. Running Pylint
=================
@@ -169,7 +183,6 @@ No, starting from 0.25.3, you can use symbolic names for messages::
# pylint: disable=fixme, line-too-long
-You can show these symbols in the output with the `-sy` option.
4.5 I have a callback function where I have no control over received arguments. How do I avoid getting unused argument warnings?
----------------------------------------------------------------------------------------------------------------------------------
@@ -192,54 +205,17 @@ tricks like: ::
method-hidden,
too-many-lines
-4.7 Why do I get a lot of spurious "unused variables messages" when using psyobj from psyco_?
-----------------------------------------------------------------------------------------------
-
-This is actually due to a bug in psyco, making the locals()
-function for objects inheriting from *psyobj* returning an empty
-dictionary. For the moment, the only way to fix this is to use the
-PYLINT_IMPORT environment variable to not use psyco during Pylint
-checking. Sample code ::
-
- import os
- try:
- if os.environ.has_key('PYLINT_IMPORT'):
- raise ImportError()
- from psyco.classes import psyobj
- except ImportError:
- class psyobj:
- pass
-
-NOTICE: this problem should not occur with Pylint >= 0.5 since from
-this version Pylint is not looking anymore for information in living
-objects (i.e. it no longer imports analysed modules)
-
-.. _psyco: http://psyco.sf.net
-
5. Classes and Inheritance
==========================
-5.1 When is Pylint considering a class as an interface?
--------------------------------------------------------
-
-A class is considered as an interface if there is a class named "Interface"
-somewhere in its inheritance tree.
-
-5.2 When is Pylint considering that a class is implementing a given interface?
---------------------------------------------------------------------------------
-
-Pylint is using the Zope 2 interfaces conventions, and so is
-considering that a class is implementing interfaces listed in its
-__implements__ attribute.
-
-5.3 When is Pylint considering a class as an abstract class?
+5.1 When is Pylint considering a class as an abstract class?
-------------------------------------------------------------
A class is considered as an abstract class if at least one of its
methods is doing nothing but raising NotImplementedError.
-5.4 How do I avoid "access to undefined member" messages in my mixin classes?
+5.2 How do I avoid "access to undefined member" messages in my mixin classes?
-------------------------------------------------------------------------------
To do so you have to set the ignore-mixin-members option to
@@ -259,7 +235,7 @@ lower bound on it. By default, the formula to calculate score is ::
10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
However, this option can be changed in the Pylint rc file. If having negative
-values really bugs you, you can set the formula to be the minimum of 0 and the
+values really bugs you, you can set the formula to be the maximum of 0 and the
above expression.
@@ -272,12 +248,25 @@ mangled sys.path. Pylint doesn't import any of the candidate modules and
thus doesn't include any of import's side effects (good and bad). It
traverses an AST representation of the code.
-6.3 I think I found a bug in Pylint. What should I do?
+6.3 Pylint keeps crashing with `Maximum recursion depth exceeded`
+-----------------------------------------------------------------
+
+Pylint can crash with this error if you have a string in your analyzed
+program, created by joining a lot of strings with the addition operator.
+Due to how Pylint works, visiting nodes on a AST tree and due to how
+the BinOp node is represented (the node which represents the string '1+1'
+for instance), the same visit method will be called over and over again, leading
+to a maximum recursion error. You can alleviate this problem by passing
+the flag `--optimize-ast=y` to Pylint. This will activate an optimization
+which will transform such AST subtrees into the final resulting string.
+This flag is off by default. If this is not the case, please report a bug!
+
+6.4 I think I found a bug in Pylint. What should I do?
-------------------------------------------------------
Read http://docs.pylint.org/contribute#bug-reports-feedback
-6.4 I have a question about Pylint that isn't answered here.
+6.5 I have a question about Pylint that isn't answered here.
------------------------------------------------------------
Read http://docs.pylint.org/contribute#mailing-lists
diff --git a/doc/ide-integration.rst b/doc/ide-integration.rst
index de5116c..30b48e5 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
==================================
@@ -41,7 +39,6 @@ To enable flymake for Python, insert the following into your .emacs:
.. sourcecode:: common-lisp
;; Configure flymake for Python
- (setq pylint "epylint")
(when (load "flymake" t)
(defun flymake-pylint-init ()
(let* ((temp-file (flymake-init-create-temp-buffer-copy
@@ -49,7 +46,7 @@ To enable flymake for Python, insert the following into your .emacs:
(local-file (file-relative-name
temp-file
(file-name-directory buffer-file-name))))
- (list (expand-file-name pylint "") (list local-file))))
+ (list "epylint" (list local-file))))
(add-to-list 'flymake-allowed-file-name-masks
'("\\.py\\'" flymake-pylint-init)))
diff --git a/doc/index.rst b/doc/index.rst
index 57280e5..4489ade 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -26,6 +26,9 @@ https://bitbucket.org/logilab/pylint
backlinks
installation
+ changelog
+
+
Content wanted
--------------
diff --git a/doc/installation.rst b/doc/installation.rst
index 10862a8..eca0fa3 100644
--- a/doc/installation.rst
+++ b/doc/installation.rst
@@ -5,7 +5,7 @@ Dependencies
''''''''''''
Pylint requires the latest `astroid`_ and `logilab-common`_
-packages. It should be compatible with any Python version >= 2.5.
+packages. It should be compatible with any Python version >= 2.7.
.. _`astroid`: https://bitbucket.org/logilab/astroid
.. _`logilab-common`: http://www.logilab.org/project/logilab-common
diff --git a/doc/make.bat b/doc/make.bat
new file mode 100644
index 0000000..9482679
--- /dev/null
+++ b/doc/make.bat
@@ -0,0 +1,190 @@
+@ECHO OFF
+
+REM Command file for Sphinx documentation
+
+if "%SPHINXBUILD%" == "" (
+ set SPHINXBUILD=sphinx-build
+)
+set BUILDDIR=_build
+set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
+set I18NSPHINXOPTS=%SPHINXOPTS% .
+if NOT "%PAPER%" == "" (
+ set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
+ set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
+)
+
+if "%1" == "" goto help
+
+if "%1" == "help" (
+ :help
+ echo.Please use `make ^<target^>` where ^<target^> is one of
+ echo. html to make standalone HTML files
+ echo. dirhtml to make HTML files named index.html in directories
+ echo. singlehtml to make a single large HTML file
+ echo. pickle to make pickle files
+ echo. json to make JSON files
+ echo. htmlhelp to make HTML files and a HTML help project
+ echo. qthelp to make HTML files and a qthelp project
+ echo. devhelp to make HTML files and a Devhelp project
+ echo. epub to make an epub
+ echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
+ echo. text to make text files
+ echo. man to make manual pages
+ echo. texinfo to make Texinfo files
+ echo. gettext to make PO message catalogs
+ echo. changes to make an overview over all changed/added/deprecated items
+ echo. linkcheck to check all external links for integrity
+ echo. doctest to run all doctests embedded in the documentation if enabled
+ goto end
+)
+
+if "%1" == "clean" (
+ for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
+ del /q /s %BUILDDIR%\*
+ goto end
+)
+
+if "%1" == "html" (
+ %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/html.
+ goto end
+)
+
+if "%1" == "dirhtml" (
+ %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
+ goto end
+)
+
+if "%1" == "singlehtml" (
+ %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
+ goto end
+)
+
+if "%1" == "pickle" (
+ %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can process the pickle files.
+ goto end
+)
+
+if "%1" == "json" (
+ %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can process the JSON files.
+ goto end
+)
+
+if "%1" == "htmlhelp" (
+ %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can run HTML Help Workshop with the ^
+.hhp project file in %BUILDDIR%/htmlhelp.
+ goto end
+)
+
+if "%1" == "qthelp" (
+ %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; now you can run "qcollectiongenerator" with the ^
+.qhcp project file in %BUILDDIR%/qthelp, like this:
+ echo.^> qcollectiongenerator %BUILDDIR%\qthelp\a.qhcp
+ echo.To view the help file:
+ echo.^> assistant -collectionFile %BUILDDIR%\qthelp\a.ghc
+ goto end
+)
+
+if "%1" == "devhelp" (
+ %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished.
+ goto end
+)
+
+if "%1" == "epub" (
+ %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The epub file is in %BUILDDIR%/epub.
+ goto end
+)
+
+if "%1" == "latex" (
+ %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
+ goto end
+)
+
+if "%1" == "text" (
+ %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The text files are in %BUILDDIR%/text.
+ goto end
+)
+
+if "%1" == "man" (
+ %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The manual pages are in %BUILDDIR%/man.
+ goto end
+)
+
+if "%1" == "texinfo" (
+ %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
+ goto end
+)
+
+if "%1" == "gettext" (
+ %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
+ goto end
+)
+
+if "%1" == "changes" (
+ %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.The overview file is in %BUILDDIR%/changes.
+ goto end
+)
+
+if "%1" == "linkcheck" (
+ %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Link check complete; look for any errors in the above output ^
+or in %BUILDDIR%/linkcheck/output.txt.
+ goto end
+)
+
+if "%1" == "doctest" (
+ %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Testing of doctests in the sources finished, look at the ^
+results in %BUILDDIR%/doctest/output.txt.
+ goto end
+)
+
+:end
diff --git a/doc/message-control.rst b/doc/message-control.rst
index 1929d73..203229d 100644
--- a/doc/message-control.rst
+++ b/doc/message-control.rst
@@ -64,7 +64,7 @@ An example available from the examples directory:
# no error
print self.bla
try:
- pylint: enable=no-member
+ # pylint: enable=no-member
# error
print self.blip
except UndefinedName: # pylint: disable=undefined-variable
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/doc/output.rst b/doc/output.rst
index 3a87547..389becd 100644
--- a/doc/output.rst
+++ b/doc/output.rst
@@ -33,7 +33,7 @@ C
category
fullname of the message category
-For exemple the former (pre 1.0) default format can be obtained with::
+For example, the former (pre 1.0) default format can be obtained with::
pylint --msg-template='{msg_id}:{line:3d},{column}: {obj}: {msg}'
@@ -51,6 +51,9 @@ A few other examples:
{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}
+* HTML output (Default for the html output format) format::
+
+ '{category}{module}{obj}{line}{column}{msg}'
.. _Python new format syntax: http://docs.python.org/2/library/string.html#formatstrings
diff --git a/doc/release.txt b/doc/release.txt
new file mode 100644
index 0000000..96d4186
--- /dev/null
+++ b/doc/release.txt
@@ -0,0 +1,23 @@
+Release Process
+===============
+
+1. Preparation
+ 1. Check if the dependencies of the package are correct
+ 2. Update the version number in __pkginfo__
+ 3. Put the version number and the release date into the changelog
+ 4. Submit your changes.
+
+2. Make sure the tests are passing on drone.io:
+ https://drone.io/bitbucket.org/logilab/pylint
+
+3. Add a new tag 'pylint-$VERSION'
+
+5. Publish all remaining changes to the Bitbucket repository:
+ https://bitbucket.org/logilab/pylint
+
+4. Run
+
+ $ python setup.py register sdist --formats=gztar bdist_wheel upload
+
+ to release a new version to PyPI.
+ \ No newline at end of file
diff --git a/doc/run.rst b/doc/run.rst
index d4a2aa9..85db098 100644
--- a/doc/run.rst
+++ b/doc/run.rst
@@ -31,9 +31,9 @@ directory is automatically added on top of the python path ::
will work if "directory" is a python package (i.e. has an __init__.py
file) or if "directory" is in the python path.
-For more details on this see the Frequently Asked Questions.
+For more details on this see the :ref:`faq`.
-You can also start a thin gui around Pylint (require TkInter) by
+You can also start a thin gui around Pylint (require tkinter) by
typing ::
pylint-gui
@@ -43,7 +43,7 @@ or module to check, at Pylint messages will be displayed in the user
interface.
It is also possible to call Pylint from an other python program,
-thanks to ``py_run()`` function in ``lint`` module,
+thanks to ``py_run()`` function in ``epylint`` module,
assuming Pylint options are stored in ``pylint_options`` string, as:
.. sourcecode:: python
@@ -52,12 +52,12 @@ assuming Pylint options are stored in ``pylint_options`` string, as:
lint.py_run(pylint_options)
To silently run Pylint on a ``module_name.py`` module,
-and get its standart output and error:
+and get its standard output and error:
.. sourcecode:: python
from pylint import epylint as lint
- (pylint_stdout, pylint_stderr) = lint.py_run('module_name.py', True)
+ (pylint_stdout, pylint_stderr) = lint.py_run('module_name.py', return_std=True)
Command line options
@@ -90,7 +90,7 @@ expression in special cases). For a full list of options, use ``--help``
Specifying all the options suitable for your setup and coding
standards can be tedious, so it is possible to use a configuration file to
-specify the default values. You can specify a configuration file on the
+specify the default values. You can specify a configuration file on the
command line using the ``--rcfile`` option. Otherwise, Pylint searches for a
configuration file in the following order and uses the first one it finds:
@@ -106,7 +106,6 @@ configuration file in the following order and uses the first one it finds:
#. ``.pylintrc`` in your home directory
#. ``.config/pylintrc`` in your home directory
- else, ``.pylintrc`` in the current working directory
#. ``/etc/pylintrc``
The ``--generate-rcfile`` option will generate a commented configuration file
@@ -117,16 +116,41 @@ includes:
* Options appearing before ``--generate-rcfile`` on the Pylint command line
Of course you can also start with the default values and hand tune the
-configuration.
+configuration.
Other useful global options include:
---ignore=file Add <file> (may be a directory) to the black
+--ignore=<file[,file]> Add <file> (may be a directory) to the black
list. It should be a base name, not a path.
- You may set this option multiple times.
+ Multiple entries can be given, separated by
+ comma.
--persistent=y_or_n Pickle collected data for later comparisons.
--output-format=<format> Select output format (text, html, custom).
--msg-template=<template> Modifiy text output message template.
--list-msgs Generate pylint's messages.
---full-documentation Generate pylint's full documentation, in reST
+--full-documentation Generate pylint's full documentation, in reST
format.
+
+Parallel execution
+------------------
+
+It is possible to speed up the execution of Pylint. If the running computer
+has more CPUs than one, then the files to be checked could be spread on all
+processors to Pylint sub-processes.
+This functionality is exposed via ``-j`` command line parameter.
+It takes a number of sub-processes that should be spawned.
+If the provided number is 0 then the number of CPUs will be used.
+The default number of workers is 1.
+
+Example::
+
+ pylint -j 4 mymodule1.py mymodule2.py mymodule3.py mymodule4.py
+
+This will spawn 4 parallel Pylint sub-process, where each provided module will
+be checked in parallel. Discovered problems by checkers are not displayed
+immediately. They are shown just after completing checking a module.
+
+There are some limitations in running checks in parallel in current
+implementation. It is not possible to use custom plugins
+(i.e. ``--load-plugins`` option), nor it is not possible to use
+initialization hooks (i.e. ``--init-hook`` option).