Skip to content

Commit f906a22

Browse files
[doc] Move all messages documentation to user_guide/messages
1 parent e9de33c commit f906a22

11 files changed

+51
-37
lines changed

.gitignore

+8-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,14 @@
99
/pylint.egg-info/
1010
.tox
1111
*.sw[a-z]
12-
doc/messages/
12+
# Can't use | operator in .gitignore, see
13+
# https://unix.stackexchange.com/a/31806/189111
14+
doc/user_guide/messages/convention/
15+
doc/user_guide/messages/error/
16+
doc/user_guide/messages/fatal/
17+
doc/user_guide/messages/information/
18+
doc/user_guide/messages/refactor/
19+
doc/user_guide/messages/warning/
1320
doc/technical_reference/extensions.rst
1421
doc/technical_reference/features.rst
1522
doc/user_guide/configuration/all-options.rst

doc/Makefile

+3-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ help:
3636
@echo " linkcheck to check all external links for integrity"
3737

3838
clean:
39-
-rm -rf $(BUILDDIR)/* messages/convention messages/error messages/fatal messages/information \
40-
messages/refactor messages/warning technical_reference/extensions.rst technical_reference/features.rst
39+
-rm -rf $(BUILDDIR)/* user_guide/messages/convention user_guide/messages/error \
40+
user_guide/messages/fatal user_guide/messages/information user_guide/messages/refactor \
41+
user_guide/messages/warning technical_reference/extensions.rst technical_reference/features.rst
4142

4243
install-dependencies:
4344
@echo "Install dependencies"

doc/conf.py

+3
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@
5151
"intro": "index.html",
5252
"support": "contact.html",
5353
"user_guide/ide-integration": "installation.html",
54+
"messages/index": "user_guide/messages/index.html",
55+
"messages/messages_introduction": "user_guide/messages/index.html",
56+
"user_guide/message-control": "user_guide/messages/message-control.html",
5457
}
5558

5659
# Add any paths that contain templates here, relative to this directory.

doc/exts/pylint_messages.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
PYLINT_BASE_PATH = Path(__file__).resolve().parent.parent.parent
2424
"""Base path to the project folder."""
2525

26-
PYLINT_MESSAGES_PATH = PYLINT_BASE_PATH / "doc" / "messages"
26+
PYLINT_MESSAGES_PATH = PYLINT_BASE_PATH / "doc/user_guide/messages"
2727
"""Path to the messages documentation folder."""
2828

2929
PYLINT_MESSAGES_DATA_PATH = PYLINT_BASE_PATH / "doc" / "data" / "messages"

doc/index.rst

-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ re-evaluate and re-enable messages as your priorities evolve.
4444
tutorial
4545
user_guide/index.rst
4646
how_tos/index.rst
47-
messages/index.rst
4847
technical_reference/index.rst
4948
development_guide/index.rst
5049
additional_commands/index.rst

doc/messages/index.rst

-11
This file was deleted.

doc/messages/messages_introduction.rst

-15
This file was deleted.

doc/user_guide/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ User Guide
99
installation
1010
run
1111
output
12-
message-control
12+
messages/index
1313
options
1414
ide_integration/ide-integration
1515
pre-commit-integration

doc/user_guide/messages/index.rst

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
.. _messages:
2+
3+
########
4+
Messages
5+
########
6+
7+
.. toctree::
8+
:maxdepth: 2
9+
:hidden:
10+
11+
12+
messages_list.rst
13+
message-control.rst
14+
15+
Pylint can emit various messages. These are categorized according
16+
to categories corresponding to bit-encoded exit codes:
17+
18+
* :ref:`Fatal` (1)
19+
* :ref:`Error` (2)
20+
* :ref:`Warning` (4)
21+
* :ref:`Convention` (8)
22+
* :ref:`Refactor` (16)
23+
* :ref:`Information` (NA)
24+
25+
A list of these messages can be found in :ref:`messages-list`
26+
27+
Disabling messages
28+
==================
29+
30+
``pylint`` has an advanced message control for its checks, offering the ability
31+
to enable / disable a message either from the command line or from the configuration
32+
file, as well as from the code itself.
33+
34+
For more detail see :ref:`message-control`

doc/user_guide/message-control.rst renamed to doc/user_guide/messages/message-control.rst

+1-5
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@
33
Messages control
44
================
55

6-
``pylint`` has an advanced message control for its checks, offering the ability
7-
to enable / disable a message either from the command line or from the configuration
8-
file, as well as from the code itself.
9-
10-
For all of these controls, ``pylint`` accepts the following values:
6+
In order to control messages, ``pylint`` accepts the following values:
117

128
* a symbolic message: ``no-member``, ``undefined-variable`` etc.
139

0 commit comments

Comments
 (0)