Skip to content

Commit c6dd902

Browse files
[doc] Reorganize the doc table of content with foor levels of guide
User, developper, contributor, maintainer.
1 parent d11bfec commit c6dd902

28 files changed

+120
-81
lines changed

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ doc/user_guide/messages/fatal/
1717
doc/user_guide/messages/information/
1818
doc/user_guide/messages/refactor/
1919
doc/user_guide/messages/warning/
20-
doc/technical_reference/extensions.rst
21-
doc/technical_reference/features.rst
20+
doc/user_guide/configuration/extensions.rst
21+
doc/user_guide/configuration/features.rst
2222
doc/user_guide/configuration/all-options.rst
2323
pyve
2424
build-stamp

doc/conf.py

+18
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"sphinx.ext.autosectionlabel",
4444
"sphinx.ext.intersphinx",
4545
"sphinx_reredirects",
46+
"myst_parser",
4647
]
4748

4849

@@ -63,6 +64,23 @@
6364
"user_guide/message-control": "messages/message_control.html",
6465
"technical_reference/c_extensions": "../user_guide/c_extensions.html",
6566
"development/testing": "tests/index.html",
67+
"development_guide/contribute": "../development_guide/contributor_guide/index.html",
68+
"how_tos/custom_checkers": "../development_guide/how_tos/custom_checkers.html",
69+
"how_tos/index": "../development_guide/how_tos/index.html",
70+
"how_tos/plugins": "../development_guide/how_tos/plugins.html",
71+
"how_tos/transform_plugins": "../development_guide/how_tos/transform_plugins.html",
72+
"technical_reference/checkers": "../development_guide/technical_reference/checkers.html",
73+
"technical_reference/index": "../development_guide/technical_reference/index.html",
74+
"technical_reference/startup": "../development_guide/technical_reference/startup.html",
75+
"technical_reference/features": "../user_guide/configuration/features.html",
76+
"user_guide/options": "configuration/index.html",
77+
"user_guide/ide_integration/ide-integration": "index.html",
78+
"development_guide/tests/index": "../contributor_guide/tests/index.html",
79+
"development_guide/tests/install": "../contributor_guide/tests/install.html",
80+
"development_guide/tests/launching_test": "../contributor_guide/tests/launching_test.html",
81+
# There was a typo in the original file, don't fix.
82+
"development_guide/tests/writting_test": "../contributor_guide/tests/writing_test.html",
83+
"development_guide/contributor_guide": "contributor_guide/index.html",
6684
}
6785

6886
# Add any paths that contain templates here, relative to this directory.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Contributor guide
2+
=================
3+
4+
The contributor guide will help you if you want to contribute to pylint itself.
5+
6+
.. toctree::
7+
:maxdepth: 2
8+
:titlesonly:
9+
10+
contribute
11+
tests/index
12+
release
File renamed without changes.

doc/development_guide/tests/index.rst renamed to doc/development_guide/contributor_guide/tests/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ unless they include tests.
1515

1616
install
1717
launching_test
18-
writting_test
18+
writing_test
File renamed without changes.
File renamed without changes.

doc/development_guide/index.rst

+11-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
1-
Development
2-
===========
1+
===============
2+
Developer guide
3+
===============
4+
5+
The developer guide will help you with development around pylint,
6+
launching pylint programmatically, creating custom plugins,
7+
creating custom checkers, but also contain the contributor guide
8+
if you want to contribute to pylint itself.
39

410
.. toctree::
511
:maxdepth: 2
612
:titlesonly:
713

8-
contribute
9-
tests/index
14+
how_tos/index.rst
15+
technical_reference/index.rst
1016
api/index
1117
profiling
18+
contributor_guide/index

doc/technical_reference/index.rst renamed to doc/development_guide/technical_reference/index.rst

-2
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,3 @@ Technical Reference
1414

1515
startup
1616
checkers
17-
extensions
18-
features

doc/exts/pylint_extensions.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,10 @@ def builder_inited(app: Optional[Sphinx]) -> None:
4747
linter.load_plugin_modules(modules)
4848

4949
extensions_doc = os.path.join(
50-
base_path, "doc", "technical_reference", "extensions.rst"
50+
base_path, "doc", "user_guide", "configuration", "extensions.rst"
5151
)
5252
with open(extensions_doc, "w", encoding="utf-8") as stream:
53-
stream.write(
54-
get_rst_title("Optional Pylint checkers in the extensions module", "=")
55-
)
53+
stream.write(get_rst_title("Optional Pylint checkers", "="))
5654
stream.write("Pylint provides the following optional plugins:\n\n")
5755
for module in modules:
5856
stream.write(f"- :ref:`{module}`\n")

doc/exts/pylint_features.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ def builder_inited(app: Optional[Sphinx]) -> None:
2424
)
2525
linter = PyLinter()
2626
linter.load_default_plugins()
27-
features = os.path.join(base_path, "doc", "technical_reference", "features.rst")
27+
features = os.path.join(
28+
base_path, "doc", "user_guide", "configuration", "features.rst"
29+
)
2830
with open(features, "w", encoding="utf-8") as stream:
2931
stream.write("Pylint features\n")
3032
stream.write("===============\n\n")

doc/faq.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ they are prone to false positives or that they are opinionated enough
157157
for not being included as default messages.
158158

159159
You can see the plugin you need to explicitly :ref:`load in the technical reference
160-
<technical_reference/extensions:optional pylint checkers in the extensions module>`.
160+
<user_guide/configuration/extensions:optional Pylint checkers>`.
161161

162162
4.8 I am using another popular linter alongside pylint. Which messages should I disable to avoid duplicates?
163163
------------------------------------------------------------------------------------------------------------

doc/index.rst

-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
tutorial
99
user_guide/index.rst
10-
how_tos/index.rst
11-
technical_reference/index.rst
1210
development_guide/index.rst
1311
pyreverse
1412
symilar

doc/requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Sphinx==4.5.0
22
sphinx-reredirects<1
3+
myst-parser~=0.16
34
furo==2022.4.7
45
-e .
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
=============
2+
Configuration
3+
=============
4+
5+
Pylint is highly configurable. There's a lot of options to follow the need of
6+
every projects and a lot of checks to activate if they suit your style.
7+
8+
.. toctree::
9+
:maxdepth: 2
10+
:titlesonly:
11+
12+
all-options
13+
features
14+
extensions
15+
naming-styles

doc/user_guide/ide_integration/ide-integration.rst

-11
This file was deleted.
+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
.. _ide-integration:
2+
3+
###########################
4+
Editor and IDE integration
5+
###########################
6+
7+
Pylint can be integrated in various editors and IDE's.
8+
Below you can find tutorials for some of the most common ones.
9+
10+
- Eclipse_
11+
- Emacs_
12+
- `Eric IDE`_ in the `Project > Check` menu,
13+
- gedit_ (`another option for gedit`_)
14+
- :ref:`Flymake <pylint_in_flymake>`
15+
- `Jupyter Notebook`_
16+
- Komodo_
17+
- `Pycharm`_
18+
- PyDev_
19+
- pyscripter_ in the `Tool -> Tools` menu.
20+
- Spyder_ in the `View -> Panes -> Static code analysis`
21+
- :ref:`TextMate <pylint_in_textmate>`
22+
- Vim_
23+
- `Visual Studio Code`_ in the `Preferences -> Settings` menu
24+
- `Visual Studio Code Pylint Extension`_
25+
- `Visual Studio`_ in the `Python > Run PyLint` command on a project's context menu.
26+
- WingIDE_
27+
28+
.. _Eclipse: https://www.pydev.org/manual_adv_pylint.html
29+
.. _Emacs: https://www.emacswiki.org/emacs/PythonProgrammingInEmacs
30+
.. _Eric IDE: https://eric-ide.python-projects.org/
31+
.. _gedit: https://launchpad.net/gedit-pylint-2
32+
.. _another option for gedit: https://wiki.gnome.org/Apps/Gedit/PylintPlugin
33+
.. _Jupyter Notebook: https://github.com/nbQA-dev/nbQA
34+
.. _Komodo: https://mateusz.loskot.net/post/2006/01/15/running-pylint-from-komodo/
35+
.. _Pycharm: https://stackoverflow.com/a/46409649/2519059
36+
.. _pydev: https://www.pydev.org/manual_adv_pylint.html
37+
.. _pyscripter: https://github.com/pyscripter/pyscripter
38+
.. _spyder: https://docs.spyder-ide.org/current/panes/pylint.html
39+
.. _Vim: https://www.vim.org/scripts/script.php?script_id=891
40+
.. _Visual Studio: https://docs.microsoft.com/visualstudio/python/code-pylint
41+
.. _Visual Studio Code: https://code.visualstudio.com/docs/python/linting#_pylint
42+
.. _Visual Studio Code Pylint Extension: https://marketplace.visualstudio.com/items?itemName=ms-python.pylint
43+
.. _WingIDE: https://wingware.com/doc/warnings/external-checkers
44+
45+
.. toctree::
46+
:maxdepth: 2
47+
:titlesonly:
48+
:hidden:
49+
50+
flymake-emacs.rst
51+
textmate.rst

doc/user_guide/index.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ User Guide
77
:titlesonly:
88

99
installation
10+
ide_integration/index
1011
run
1112
output
1213
c_extensions
1314
messages/index
14-
options
15-
ide_integration/ide-integration
15+
configuration/index
16+
1617
pre-commit-integration
1718
badge

doc/user_guide/installation.rst

-41
Original file line numberDiff line numberDiff line change
@@ -36,44 +36,3 @@ entity on a slower release cycle.
3636
.. code-block:: sh
3737
3838
sudo apt-get install pylint
39-
40-
41-
Editor integration
42-
------------------
43-
44-
.. _ide-integration:
45-
46-
- Eclipse_
47-
- Emacs_
48-
- `Eric IDE`_ in the `Project > Check` menu,
49-
- gedit_ (`another option for gedit`_)
50-
- :ref:`Flymake <pylint_in_flymake>`
51-
- `Jupyter Notebook`_
52-
- Komodo_
53-
- `Pycharm`_
54-
- PyDev_
55-
- pyscripter_ in the `Tool -> Tools` menu.
56-
- Spyder_ in the `View -> Panes -> Static code analysis`
57-
- :ref:`TextMate <pylint_in_textmate>`
58-
- Vim_
59-
- `Visual Studio Code`_ in the `Preferences -> Settings` menu
60-
- `Visual Studio Code Pylint Extension`_
61-
- `Visual Studio`_ in the `Python > Run PyLint` command on a project's context menu.
62-
- WingIDE_
63-
64-
.. _Eclipse: https://www.pydev.org/manual_adv_pylint.html
65-
.. _Emacs: https://www.emacswiki.org/emacs/PythonProgrammingInEmacs
66-
.. _Eric IDE: https://eric-ide.python-projects.org/
67-
.. _gedit: https://launchpad.net/gedit-pylint-2
68-
.. _another option for gedit: https://wiki.gnome.org/Apps/Gedit/PylintPlugin
69-
.. _Jupyter Notebook: https://github.com/nbQA-dev/nbQA
70-
.. _Komodo: https://mateusz.loskot.net/post/2006/01/15/running-pylint-from-komodo/
71-
.. _Pycharm: https://stackoverflow.com/a/46409649/2519059
72-
.. _pydev: https://www.pydev.org/manual_adv_pylint.html
73-
.. _pyscripter: https://github.com/pyscripter/pyscripter
74-
.. _spyder: https://docs.spyder-ide.org/current/panes/pylint.html
75-
.. _Vim: https://www.vim.org/scripts/script.php?script_id=891
76-
.. _Visual Studio: https://docs.microsoft.com/visualstudio/python/code-pylint
77-
.. _Visual Studio Code: https://code.visualstudio.com/docs/python/linting#_pylint
78-
.. _Visual Studio Code Pylint Extension: https://marketplace.visualstudio.com/items?itemName=ms-python.pylint
79-
.. _WingIDE: https://wingware.com/doc/warnings/external-checkers

doc/user_guide/options.rst

-10
This file was deleted.

0 commit comments

Comments
 (0)