This file is indexed.

/usr/share/doc/pylint-doc/html/options.html is in pylint-doc 1.5.2-1ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Configuration &mdash; Pylint 1.5.2 documentation</title>
    
    <link rel="stylesheet" href="_static/classic.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '1.5.2',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="top" title="Pylint 1.5.2 documentation" href="index.html" />
    <link rel="next" title="Extending Pylint" href="extend.html" />
    <link rel="prev" title="Optional Pylint checkers in the extensions module" href="extensions.html" /> 
  </head>
  <body role="document">
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="extend.html" title="Extending Pylint"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="extensions.html" title="Optional Pylint checkers in the extensions module"
             accesskey="P">previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">Pylint 1.5.2 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="configuration">
<h1>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline"></a></h1>
<div class="section" id="naming-styles">
<h2>Naming Styles<a class="headerlink" href="#naming-styles" title="Permalink to this headline"></a></h2>
<p>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.</p>
<dl class="docutils">
<dt><code class="docutils literal"><span class="pre">module</span></code></dt>
<dd>Module and package names, same as the file names.</dd>
<dt><code class="docutils literal"><span class="pre">const</span></code></dt>
<dd>Module-level constants, any variable defined at module level that is not bound to a class object.</dd>
<dt><code class="docutils literal"><span class="pre">class</span></code></dt>
<dd>Names in <code class="docutils literal"><span class="pre">class</span></code> statements, as well as names bound to class objects at module level.</dd>
<dt><code class="docutils literal"><span class="pre">function</span></code></dt>
<dd>Functions, toplevel or nested in functions or methods.</dd>
<dt><code class="docutils literal"><span class="pre">method</span></code></dt>
<dd>Methods, functions defined in class bodies. Includes static and class methods.</dd>
<dt><code class="docutils literal"><span class="pre">attr</span></code></dt>
<dd>Attributes created on class instances inside methods.</dd>
<dt><code class="docutils literal"><span class="pre">argument</span></code></dt>
<dd>Arguments to any function type, including lambdas.</dd>
<dt><code class="docutils literal"><span class="pre">variable</span></code></dt>
<dd>Local variables in function scopes.</dd>
<dt><code class="docutils literal"><span class="pre">class-attribute</span></code></dt>
<dd>Attributes defined in class bodies.</dd>
<dt><code class="docutils literal"><span class="pre">inlinevar</span></code></dt>
<dd>Loop variables in list comprehensions and generator expressions.</dd>
</dl>
<p>For each naming style, a separate regular expression matching valid names of
this type can be defined. By default, the regular expressions will enforce PEP8
names.</p>
<p>Regular expressions for the names are anchored at the beginning, any anchor for
the end must be supplied explicitly. Any name not matching the regular
expression will lead to an instance of <code class="docutils literal"><span class="pre">invalid-name</span></code>.</p>
<dl class="option">
<dt id="cmdoption--module-rgx">
<code class="descname">--module-rgx</code><code class="descclassname">=&lt;regex&gt;</code><a class="headerlink" href="#cmdoption--module-rgx" title="Permalink to this definition"></a></dt>
<dd><p>Default value: <code class="docutils literal"><span class="pre">[a-z_][a-z0-9_]{2,30}$</span></code></p>
</dd></dl>

<dl class="option">
<dt id="cmdoption--const-rgx">
<code class="descname">--const-rgx</code><code class="descclassname">=&lt;regex&gt;</code><a class="headerlink" href="#cmdoption--const-rgx" title="Permalink to this definition"></a></dt>
<dd><p>Default value: <code class="docutils literal"><span class="pre">[a-z_][a-z0-9_]{2,30}$</span></code></p>
</dd></dl>

<dl class="option">
<dt id="cmdoption--class-rgx">
<code class="descname">--class-rgx</code><code class="descclassname">=&lt;regex&gt;</code><a class="headerlink" href="#cmdoption--class-rgx" title="Permalink to this definition"></a></dt>
<dd><p>Default value: <code class="docutils literal"><span class="pre">'[A-Z_][a-zA-Z0-9]+$</span></code></p>
</dd></dl>

<dl class="option">
<dt id="cmdoption--function-rgx">
<code class="descname">--function-rgx</code><code class="descclassname">=&lt;regex&gt;</code><a class="headerlink" href="#cmdoption--function-rgx" title="Permalink to this definition"></a></dt>
<dd><p>Default value: <code class="docutils literal"><span class="pre">[a-z_][a-z0-9_]{2,30}$</span></code></p>
</dd></dl>

<dl class="option">
<dt id="cmdoption--method-rgx">
<code class="descname">--method-rgx</code><code class="descclassname">=&lt;regex&gt;</code><a class="headerlink" href="#cmdoption--method-rgx" title="Permalink to this definition"></a></dt>
<dd><p>Default value: <code class="docutils literal"><span class="pre">[a-z_][a-z0-9_]{2,30}$</span></code></p>
</dd></dl>

<dl class="option">
<dt id="cmdoption--attr-rgx">
<code class="descname">--attr-rgx</code><code class="descclassname">=&lt;regex&gt;</code><a class="headerlink" href="#cmdoption--attr-rgx" title="Permalink to this definition"></a></dt>
<dd><p>Default value: <code class="docutils literal"><span class="pre">[a-z_][a-z0-9_]{2,30}$</span></code></p>
</dd></dl>

<dl class="option">
<dt id="cmdoption--argument-rgx">
<code class="descname">--argument-rgx</code><code class="descclassname">=&lt;regex&gt;</code><a class="headerlink" href="#cmdoption--argument-rgx" title="Permalink to this definition"></a></dt>
<dd><p>Default value: <code class="docutils literal"><span class="pre">[a-z_][a-z0-9_]{2,30}$</span></code></p>
</dd></dl>

<dl class="option">
<dt id="cmdoption--variable-rgx">
<code class="descname">--variable-rgx</code><code class="descclassname">=&lt;regex&gt;</code><a class="headerlink" href="#cmdoption--variable-rgx" title="Permalink to this definition"></a></dt>
<dd><p>Default value: <code class="docutils literal"><span class="pre">[a-z_][a-z0-9_]{2,30}$</span></code></p>
</dd></dl>

<dl class="option">
<dt id="cmdoption--class-attribute-rgx">
<code class="descname">--class-attribute-rgx</code><code class="descclassname">=&lt;regex&gt;</code><a class="headerlink" href="#cmdoption--class-attribute-rgx" title="Permalink to this definition"></a></dt>
<dd><p>Default value: <code class="docutils literal"><span class="pre">([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$</span></code></p>
</dd></dl>

<dl class="option">
<dt id="cmdoption--inlinevar-rgx">
<code class="descname">--inlinevar-rgx</code><code class="descclassname">=&lt;regex&gt;</code><a class="headerlink" href="#cmdoption--inlinevar-rgx" title="Permalink to this definition"></a></dt>
<dd><p>Default value: <code class="docutils literal"><span class="pre">[A-Za-z_][A-Za-z0-9_]*$</span></code></p>
</dd></dl>

<div class="section" id="multiple-naming-styles">
<h3>Multiple Naming Styles<a class="headerlink" href="#multiple-naming-styles" title="Permalink to this headline"></a></h3>
<p>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.</p>
<p>Rather than emitting name warnings immediately, Pylint will determine the
prevalent naming style inside each module and enforce it on all names.</p>
<p>Consider the following (simplified) example:</p>
<div class="highlight-python"><div class="highlight"><pre>pylint --function-rgx=&#39;(?:(?P&lt;snake&gt;[a-z_]+)|(?P&lt;camel&gt;_?[A-Z]+))$&#39; sample.py
</pre></div>
</div>
<p>The regular expression defines two naming styles, <code class="docutils literal"><span class="pre">snake</span></code> for snake-case
names, and <code class="docutils literal"><span class="pre">camel</span></code> for camel-case names.</p>
<p>In <code class="docutils literal"><span class="pre">sample.py</span></code>, the function name on line 1 and 7 will mark the module
and enforce the match of named group <code class="docutils literal"><span class="pre">snake</span></code> for the remaining names in
the module:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">def</span> <span class="nf">valid_snake_case</span><span class="p">(</span><span class="n">arg</span><span class="p">):</span>
   <span class="o">...</span>

<span class="k">def</span> <span class="nf">InvalidCamelCase</span><span class="p">(</span><span class="n">arg</span><span class="p">):</span>
   <span class="o">...</span>

<span class="k">def</span> <span class="nf">more_valid_snake_case</span><span class="p">(</span><span class="n">arg</span><span class="p">):</span>
 <span class="o">...</span>
</pre></div>
</div>
<p>Because of this, the name on line 4 will trigger an <code class="docutils literal"><span class="pre">invalid-name</span></code> warning,
even though the name matches the given regex.</p>
<p>Matches named <code class="docutils literal"><span class="pre">exempt</span></code> or <code class="docutils literal"><span class="pre">ignore</span></code> can be used for non-tainting names, to
prevent built-in or interface-dictated names to trigger certain naming styles.</p>
<dl class="option">
<dt id="cmdoption--name-group">
<code class="descname">--name-group</code><code class="descclassname">=&lt;name1:name2:...,...&gt;</code><a class="headerlink" href="#cmdoption--name-group" title="Permalink to this definition"></a></dt>
<dd><p>Default value: empty</p>
<p>Format: comma-separated groups of colon-separated names.</p>
<p>This option can be used to combine name styles. For example, <code class="docutils literal"><span class="pre">function:method</span></code> enforces that functions and methods use the same style, and a style triggered by either name type carries over to the other. This requires that the regular expression for the combined name types use the same group names.</p>
</dd></dl>

</div>
<div class="section" id="name-hints">
<h3>Name Hints<a class="headerlink" href="#name-hints" title="Permalink to this headline"></a></h3>
<dl class="option">
<dt id="cmdoption--include-naming-hint">
<code class="descname">--include-naming-hint</code><code class="descclassname">=y|n</code><a class="headerlink" href="#cmdoption--include-naming-hint" title="Permalink to this definition"></a></dt>
<dd><p>Default: off</p>
<p>Include a hint for the correct name format with every <code class="docutils literal"><span class="pre">invalid-name</span></code> warning.</p>
<p>Name hints default to the regular expression, but can be separately configured with the <code class="docutils literal"><span class="pre">--&lt;name-type&gt;-hint</span></code> options.</p>
</dd></dl>

</div>
</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Configuration</a><ul>
<li><a class="reference internal" href="#naming-styles">Naming Styles</a><ul>
<li><a class="reference internal" href="#multiple-naming-styles">Multiple Naming Styles</a></li>
<li><a class="reference internal" href="#name-hints">Name Hints</a></li>
</ul>
</li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="extensions.html"
                        title="previous chapter">Optional Pylint checkers in the extensions module</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="extend.html"
                        title="next chapter">Extending Pylint</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="_sources/options.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="extend.html" title="Extending Pylint"
             >next</a> |</li>
        <li class="right" >
          <a href="extensions.html" title="Optional Pylint checkers in the extensions module"
             >previous</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">Pylint 1.5.2 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &copy; Copyright 2013-2014, Logilab and contributors.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3.3.
    </div>
  </body>
</html>