Skip to content

Commit 55dbbf6

Browse files
[doc] Move the additional command section to user guide
1 parent 7ade71a commit 55dbbf6

File tree

6 files changed

+53
-49
lines changed

6 files changed

+53
-49
lines changed

doc/conf.py

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"messages/messages_introduction": "user_guide/messages/index.html",
6161
"messages/messages_list": "user_guide/messages/messages_overview.html",
6262
"user_guide/message-control": "user_guide/messages/message_control.html",
63+
"additional_commands/index": "user_guide/additional_commands/index.html",
6364
}
6465

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

doc/index.rst

-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ re-evaluate and re-enable messages as your priorities evolve.
4646
how_tos/index.rst
4747
technical_reference/index.rst
4848
development_guide/index.rst
49-
additional_commands/index.rst
5049
faq
5150
contact
5251
whatsnew/index.rst
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Additional Commands
2+
===================
3+
4+
Pylint ships with some additional tools that can be executed from the command line once Pylint
5+
itself is installed.
6+
7+
.. toctree::
8+
:maxdepth: 1
9+
:titlesonly:
10+
11+
pyreverse.rst
12+
symilar.rst
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
2-
Additional Commands
3-
===================
4-
5-
Pylint ships with some additional tools that can be executed from the command line once Pylint itself is installed.
6-
7-
81
Pyreverse
92
---------
103

@@ -35,7 +28,7 @@ Example diagrams generated with the ``.puml`` output format are shown below.
3528
Class Diagram
3629
.............
3730

38-
.. image:: ../media/pyreverse_example_classes.png
31+
.. image:: ../../media/pyreverse_example_classes.png
3932
:width: 625
4033
:height: 589
4134
:alt: Class diagram generated by pyreverse
@@ -45,7 +38,7 @@ Class Diagram
4538
Package Diagram
4639
...............
4740

48-
.. image:: ../media/pyreverse_example_packages.png
41+
.. image:: ../../media/pyreverse_example_packages.png
4942
:width: 344
5043
:height: 177
5144
:alt: Package diagram generated by pyreverse
@@ -64,46 +57,8 @@ For example, running::
6457

6558
will generate the full class and package diagrams for ``pylint``, but will additionally generate a file ``pylint.checkers.classes.ClassChecker.dot``:
6659

67-
.. image:: ../media/ClassChecker_diagram.png
60+
.. image:: ../../media/ClassChecker_diagram.png
6861
:width: 757
6962
:height: 1452
7063
:alt: Package diagram generated by pyreverse
7164
:align: center
72-
73-
74-
Symilar
75-
-------
76-
77-
The console script ``symilar`` finds copy pasted blocks in a set of files. It provides a command line interface to the ``Similar`` class, which includes the logic for
78-
Pylint's ``duplicate-code`` message.
79-
It can be invoked with::
80-
81-
symilar [-d|--duplicates min_duplicated_lines] [-i|--ignore-comments] [--ignore-docstrings] [--ignore-imports] [--ignore-signatures] file1...
82-
83-
All files that shall be checked have to be passed in explicitly, e.g.::
84-
85-
symilar foo.py, bar.py, subpackage/spam.py, subpackage/eggs.py
86-
87-
``symilar`` produces output like the following::
88-
89-
17 similar lines in 2 files
90-
==tests/data/clientmodule_test.py:3
91-
==tests/data/suppliermodule_test.py:12
92-
class Ancestor:
93-
""" Ancestor method """
94-
__implements__ = (Interface,)
95-
cls_member = DoNothing()
96-
97-
def __init__(self, value):
98-
local_variable = 0
99-
self.attr = 'this method shouldn\'t have a docstring'
100-
self.__value = value
101-
102-
def get_value(self):
103-
""" nice docstring ;-) """
104-
return self.__value
105-
106-
def set_value(self, value):
107-
self.__value = value
108-
return 'this method shouldn\'t have a docstring'
109-
TOTAL lines=58 duplicates=17 percent=29.31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
Symilar
2+
-------
3+
4+
The console script ``symilar`` finds copy pasted blocks in a set of files. It provides a command line interface to the ``Similar`` class, which includes the logic for
5+
Pylint's ``duplicate-code`` message.
6+
It can be invoked with::
7+
8+
symilar [-d|--duplicates min_duplicated_lines] [-i|--ignore-comments] [--ignore-docstrings] [--ignore-imports] [--ignore-signatures] file1...
9+
10+
All files that shall be checked have to be passed in explicitly, e.g.::
11+
12+
symilar foo.py, bar.py, subpackage/spam.py, subpackage/eggs.py
13+
14+
``symilar`` produces output like the following::
15+
16+
17 similar lines in 2 files
17+
==tests/data/clientmodule_test.py:3
18+
==tests/data/suppliermodule_test.py:12
19+
class Ancestor:
20+
""" Ancestor method """
21+
__implements__ = (Interface,)
22+
cls_member = DoNothing()
23+
24+
def __init__(self, value):
25+
local_variable = 0
26+
self.attr = 'this method shouldn\'t have a docstring'
27+
self.__value = value
28+
29+
def get_value(self):
30+
""" nice docstring ;-) """
31+
return self.__value
32+
33+
def set_value(self, value):
34+
self.__value = value
35+
return 'this method shouldn\'t have a docstring'
36+
TOTAL lines=58 duplicates=17 percent=29.31

doc/user_guide/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ User Guide
88

99
installation
1010
run
11+
additional_commands/index.rst
1112
output
1213
messages/index
1314
options

0 commit comments

Comments
 (0)