@@ -24,35 +24,7 @@ Pylint uses git. To get the latest version of Pylint from the repository, simply
24
24
3. Running Pylint
25
25
=================
26
26
27
- 3.1 Can I give pylint a file as an argument instead of a module?
28
- ----------------------------------------------------------------
29
-
30
- Pylint expects the name of a package or module as its argument. As a
31
- convenience, you can give it a file name if it's possible to guess a module name from
32
- the file's path using the python path. Some examples:
33
-
34
- "pylint mymodule.py" should always work since the current working
35
- directory is automatically added on top of the python path
36
-
37
- "pylint directory/mymodule.py" will work if "directory" is a python
38
- package (i.e. has an __init__.py file), an implicit namespace package
39
- or if "directory" is in the python path.
40
-
41
- "pylint /whatever/directory/mymodule.py" will work if either:
42
-
43
- - "/whatever/directory" is in the python path
44
-
45
- - your cwd is "/whatever/directory"
46
-
47
- - "directory" is a python package and "/whatever" is in the python
48
- path
49
-
50
- - "directory" is an implicit namespace package and is in the python path.
51
-
52
- - "directory" is a python package and your cwd is "/whatever" and so
53
- on...
54
-
55
- 3.2 Where is the persistent data stored to compare between successive runs?
27
+ 3.1 Where is the persistent data stored to compare between successive runs?
56
28
---------------------------------------------------------------------------
57
29
58
30
Analysis data are stored as a pickle file in a directory which is
@@ -71,7 +43,7 @@ localized using the following rules:
71
43
* ".pylint.d" directory in the current directory
72
44
73
45
74
- 3.3 How do I find the option name corresponding to a specific command line option?
46
+ 3.2 How do I find the option name corresponding to a specific command line option?
75
47
----------------------------------------------------------------------------------
76
48
77
49
You can generate a sample configuration file with ``--generate-toml-config ``.
@@ -82,28 +54,6 @@ For example::
82
54
83
55
pylint --disable=bare-except,invalid-name --class-rgx='[A-Z][a-z]+' --generate-toml-config
84
56
85
- 3.5 I need to run pylint over all modules and packages in my project directory.
86
- -------------------------------------------------------------------------------
87
-
88
- By default the ``pylint `` command only accepts a list of python modules and packages. Using a
89
- directory which is not a package results in an error::
90
-
91
- pylint mydir
92
- ************* Module mydir
93
- mydir/__init__.py:1:0: F0010: error while code parsing: Unable to load file mydir/__init__.py:
94
- [Errno 2] No such file or directory: 'mydir/__init__.py' (parse-error)
95
-
96
- To execute pylint over all modules and packages under the directory, the ``--recursive=y `` option must
97
- be provided. This option makes ``pylint `` attempt to discover all modules (files ending with ``.py `` extension)
98
- and all packages (all directories containing a ``__init__.py `` file).
99
- Those modules and packages are then analyzed::
100
-
101
- pylint --recursive=y mydir
102
-
103
- When ``--recursive=y `` option is used, modules and packages are also accepted as parameters::
104
-
105
- pylint --recursive=y mydir mymodule mypackage
106
-
107
57
4. Message Control
108
58
==================
109
59
0 commit comments