git-linter/git_lint.html

348 lines
23 KiB
HTML

<!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>git_lint package &#8212; Git Lint 0.0.7 documentation</title>
<link rel="stylesheet" href="static/alabaster.css" type="text/css" />
<link rel="stylesheet" href="static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.0.7',
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="Git Lint 0.0.7 documentation" href="index.html" />
<link rel="stylesheet" href="static/custom.css" type="text/css" />
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
</head>
<body role="document">
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="git-lint-package">
<h1>git_lint package<a class="headerlink" href="#git-lint-package" title="Permalink to this headline"></a></h1>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="module-git_lint.git_lint">
<span id="git-lint-git-lint-module"></span><h2>git_lint.git_lint module<a class="headerlink" href="#module-git_lint.git_lint" title="Permalink to this headline"></a></h2>
<dl class="class">
<dt id="git_lint.git_lint.Linters">
<em class="property">class </em><code class="descclassname">git_lint.git_lint.</code><code class="descname">Linters</code><span class="sig-paren">(</span><em>linters</em>, <em>filenames</em><span class="sig-paren">)</span><a class="reference internal" href="modules/git_lint/git_lint.html#Linters"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#git_lint.git_lint.Linters" title="Permalink to this definition"></a></dt>
<dd><dl class="method">
<dt id="git_lint.git_lint.Linters.dryrun">
<code class="descname">dryrun</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="modules/git_lint/git_lint.html#Linters.dryrun"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#git_lint.git_lint.Linters.dryrun" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="staticmethod">
<dt id="git_lint.git_lint.Linters.encode_shell_messages">
<em class="property">static </em><code class="descname">encode_shell_messages</code><span class="sig-paren">(</span><em>prefix</em>, <em>messages</em><span class="sig-paren">)</span><a class="reference internal" href="modules/git_lint/git_lint.html#Linters.encode_shell_messages"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#git_lint.git_lint.Linters.encode_shell_messages" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="staticmethod">
<dt id="git_lint.git_lint.Linters.run_external_linter">
<em class="property">static </em><code class="descname">run_external_linter</code><span class="sig-paren">(</span><em>filename</em>, <em>linter</em>, <em>linter_name</em><span class="sig-paren">)</span><a class="reference internal" href="modules/git_lint/git_lint.html#Linters.run_external_linter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#git_lint.git_lint.Linters.run_external_linter" title="Permalink to this definition"></a></dt>
<dd><p>Run one linter against one file.</p>
<p>If the result matches the error condition specified in the configuration file,
return the error code and messages, otherwise return nothing.</p>
</dd></dl>
<dl class="staticmethod">
<dt id="git_lint.git_lint.Linters.run_one_linter">
<em class="property">static </em><code class="descname">run_one_linter</code><span class="sig-paren">(</span><em>linter</em>, <em>filenames</em><span class="sig-paren">)</span><a class="reference internal" href="modules/git_lint/git_lint.html#Linters.run_one_linter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#git_lint.git_lint.Linters.run_one_linter" title="Permalink to this definition"></a></dt>
<dd><p>Runs one linter against a set of files</p>
<p>Creates a match filter for the linter, extract the files to be
linted, and runs the linter against each file, returning the
result as a list of successes and failures. Failures have a
return code and the output of the lint process.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="git_lint.git_lint.MatchFilter">
<em class="property">class </em><code class="descclassname">git_lint.git_lint.</code><code class="descname">MatchFilter</code><span class="sig-paren">(</span><em>config</em><span class="sig-paren">)</span><a class="reference internal" href="modules/git_lint/git_lint.html#MatchFilter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#git_lint.git_lint.MatchFilter" title="Permalink to this definition"></a></dt>
<dd><dl class="staticmethod">
<dt id="git_lint.git_lint.MatchFilter.make_match_filter_matcher">
<em class="property">static </em><code class="descname">make_match_filter_matcher</code><span class="sig-paren">(</span><em>extensions</em><span class="sig-paren">)</span><a class="reference internal" href="modules/git_lint/git_lint.html#MatchFilter.make_match_filter_matcher"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#git_lint.git_lint.MatchFilter.make_match_filter_matcher" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="git_lint.git_lint.StagingRunner">
<em class="property">class </em><code class="descclassname">git_lint.git_lint.</code><code class="descname">StagingRunner</code><span class="sig-paren">(</span><em>filenames</em><span class="sig-paren">)</span><a class="reference internal" href="modules/git_lint/git_lint.html#StagingRunner"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#git_lint.git_lint.StagingRunner" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="class">
<dt id="git_lint.git_lint.WorkspaceRunner">
<em class="property">class </em><code class="descclassname">git_lint.git_lint.</code><code class="descname">WorkspaceRunner</code><span class="sig-paren">(</span><em>filenames</em><span class="sig-paren">)</span><a class="reference internal" href="modules/git_lint/git_lint.html#WorkspaceRunner"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#git_lint.git_lint.WorkspaceRunner" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
</dd></dl>
<dl class="function">
<dt id="git_lint.git_lint.get_filelist">
<code class="descclassname">git_lint.git_lint.</code><code class="descname">get_filelist</code><span class="sig-paren">(</span><em>options</em>, <em>extras</em><span class="sig-paren">)</span><a class="reference internal" href="modules/git_lint/git_lint.html#get_filelist"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#git_lint.git_lint.get_filelist" title="Permalink to this definition"></a></dt>
<dd><p>Returns the list of files against which we&#8217;ll run the linters.</p>
</dd></dl>
<dl class="function">
<dt id="git_lint.git_lint.get_git_base">
<code class="descclassname">git_lint.git_lint.</code><code class="descname">get_git_base</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="modules/git_lint/git_lint.html#get_git_base"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#git_lint.git_lint.get_git_base" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="git_lint.git_lint.get_git_head">
<code class="descclassname">git_lint.git_lint.</code><code class="descname">get_git_head</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="modules/git_lint/git_lint.html#get_git_head"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#git_lint.git_lint.get_git_head" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="git_lint.git_lint.get_git_response">
<code class="descclassname">git_lint.git_lint.</code><code class="descname">get_git_response</code><span class="sig-paren">(</span><em>cmd</em><span class="sig-paren">)</span><a class="reference internal" href="modules/git_lint/git_lint.html#get_git_response"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#git_lint.git_lint.get_git_response" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="git_lint.git_lint.get_git_response_raw">
<code class="descclassname">git_lint.git_lint.</code><code class="descname">get_git_response_raw</code><span class="sig-paren">(</span><em>cmd</em><span class="sig-paren">)</span><a class="reference internal" href="modules/git_lint/git_lint.html#get_git_response_raw"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#git_lint.git_lint.get_git_response_raw" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="git_lint.git_lint.get_linter_status">
<code class="descclassname">git_lint.git_lint.</code><code class="descname">get_linter_status</code><span class="sig-paren">(</span><em>config</em><span class="sig-paren">)</span><a class="reference internal" href="modules/git_lint/git_lint.html#get_linter_status"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#git_lint.git_lint.get_linter_status" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="git_lint.git_lint.get_shell_response">
<code class="descclassname">git_lint.git_lint.</code><code class="descname">get_shell_response</code><span class="sig-paren">(</span><em>fullcmd</em><span class="sig-paren">)</span><a class="reference internal" href="modules/git_lint/git_lint.html#get_shell_response"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#git_lint.git_lint.get_shell_response" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="git_lint.git_lint.linter_exists">
<code class="descclassname">git_lint.git_lint.</code><code class="descname">linter_exists</code><span class="sig-paren">(</span><em>linter</em>, <em>label</em><span class="sig-paren">)</span><a class="reference internal" href="modules/git_lint/git_lint.html#linter_exists"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#git_lint.git_lint.linter_exists" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="git_lint.git_lint.load_config">
<code class="descclassname">git_lint.git_lint.</code><code class="descname">load_config</code><span class="sig-paren">(</span><em>options</em>, <em>base</em><span class="sig-paren">)</span><a class="reference internal" href="modules/git_lint/git_lint.html#load_config"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#git_lint.git_lint.load_config" title="Permalink to this definition"></a></dt>
<dd><p>Loads the git-lint configuration file.</p>
<p>Returns the configuration file as a dictionary of dictionaries.
Performs substitutions as specified in the SafeConfigParser
specification; the only one performed currently is the &#8216;repodir&#8217;
will be replaced with the base directory of the repository.
Combined with the option to specify the .git-lint configuration as
a directory, this allows users to keep per-project configuration
files for specific linters.</p>
</dd></dl>
<dl class="function">
<dt id="git_lint.git_lint.run_git_command">
<code class="descclassname">git_lint.git_lint.</code><code class="descname">run_git_command</code><span class="sig-paren">(</span><em>cmd</em><span class="sig-paren">)</span><a class="reference internal" href="modules/git_lint/git_lint.html#run_git_command"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#git_lint.git_lint.run_git_command" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="git_lint.git_lint.run_linters">
<code class="descclassname">git_lint.git_lint.</code><code class="descname">run_linters</code><span class="sig-paren">(</span><em>options</em>, <em>config</em>, <em>extras=[]</em><span class="sig-paren">)</span><a class="reference internal" href="modules/git_lint/git_lint.html#run_linters"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#git_lint.git_lint.run_linters" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="git_lint.git_lint.split_git_response">
<code class="descclassname">git_lint.git_lint.</code><code class="descname">split_git_response</code><span class="sig-paren">(</span><em>cmd</em><span class="sig-paren">)</span><a class="reference internal" href="modules/git_lint/git_lint.html#split_git_response"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#git_lint.git_lint.split_git_response" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</div>
<div class="section" id="module-git_lint.option_handler">
<span id="git-lint-option-handler-module"></span><h2>git_lint.option_handler module<a class="headerlink" href="#module-git_lint.option_handler" title="Permalink to this headline"></a></h2>
<dl class="class">
<dt id="git_lint.option_handler.Arguments">
<em class="property">class </em><code class="descclassname">git_lint.option_handler.</code><code class="descname">Arguments</code><span class="sig-paren">(</span><em>arguments</em>, <em>filenames</em>, <em>excluded</em><span class="sig-paren">)</span><a class="headerlink" href="#git_lint.option_handler.Arguments" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">tuple</span></code></p>
<dl class="attribute">
<dt id="git_lint.option_handler.Arguments.arguments">
<code class="descname">arguments</code><a class="headerlink" href="#git_lint.option_handler.Arguments.arguments" title="Permalink to this definition"></a></dt>
<dd><p>Alias for field number 0</p>
</dd></dl>
<dl class="attribute">
<dt id="git_lint.option_handler.Arguments.excluded">
<code class="descname">excluded</code><a class="headerlink" href="#git_lint.option_handler.Arguments.excluded" title="Permalink to this definition"></a></dt>
<dd><p>Alias for field number 2</p>
</dd></dl>
<dl class="attribute">
<dt id="git_lint.option_handler.Arguments.filenames">
<code class="descname">filenames</code><a class="headerlink" href="#git_lint.option_handler.Arguments.filenames" title="Permalink to this definition"></a></dt>
<dd><p>Alias for field number 1</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="git_lint.option_handler.Option">
<em class="property">class </em><code class="descclassname">git_lint.option_handler.</code><code class="descname">Option</code><span class="sig-paren">(</span><em>short</em>, <em>long</em>, <em>takes</em>, <em>help</em>, <em>conflicts</em><span class="sig-paren">)</span><a class="headerlink" href="#git_lint.option_handler.Option" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">tuple</span></code></p>
<dl class="attribute">
<dt id="git_lint.option_handler.Option.conflicts">
<code class="descname">conflicts</code><a class="headerlink" href="#git_lint.option_handler.Option.conflicts" title="Permalink to this definition"></a></dt>
<dd><p>Alias for field number 4</p>
</dd></dl>
<dl class="attribute">
<dt id="git_lint.option_handler.Option.help">
<code class="descname">help</code><a class="headerlink" href="#git_lint.option_handler.Option.help" title="Permalink to this definition"></a></dt>
<dd><p>Alias for field number 3</p>
</dd></dl>
<dl class="attribute">
<dt id="git_lint.option_handler.Option.long">
<code class="descname">long</code><a class="headerlink" href="#git_lint.option_handler.Option.long" title="Permalink to this definition"></a></dt>
<dd><p>Alias for field number 1</p>
</dd></dl>
<dl class="attribute">
<dt id="git_lint.option_handler.Option.short">
<code class="descname">short</code><a class="headerlink" href="#git_lint.option_handler.Option.short" title="Permalink to this definition"></a></dt>
<dd><p>Alias for field number 0</p>
</dd></dl>
<dl class="attribute">
<dt id="git_lint.option_handler.Option.takes">
<code class="descname">takes</code><a class="headerlink" href="#git_lint.option_handler.Option.takes" title="Permalink to this definition"></a></dt>
<dd><p>Alias for field number 2</p>
</dd></dl>
</dd></dl>
<dl class="function">
<dt id="git_lint.option_handler.cleanup_options">
<code class="descclassname">git_lint.option_handler.</code><code class="descname">cleanup_options</code><span class="sig-paren">(</span><em>options</em>, <em>commandline</em><span class="sig-paren">)</span><a class="reference internal" href="modules/git_lint/option_handler.html#cleanup_options"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#git_lint.option_handler.cleanup_options" title="Permalink to this definition"></a></dt>
<dd><dl class="docutils">
<dt>Takes a table of options and the commandline, and returns a</dt>
<dd>dictionary of those options that appear on the commandline
along with any extra arguments.</dd>
<dt>:param List(Tuple (string, string, boolean, string, List(string))) options,</dt>
<dd>The table of options: One-letter option, long option, takes arguments,
Help text, list of (long) options superseded by this one.</dd>
<dt>: param List(strings) commandline</dt>
<dd>The arguments as received by the start-up process</dd>
<dt>: returns List(strings), List(strings), List(strings)</dt>
<dd>The longopt dictionary of arguments and associated values (if any)
The list of filenames left after argument processing
The longopt list of arguments that were excluded by argument precedence</dd>
</dl>
</dd></dl>
</div>
<div class="section" id="module-git_lint.options">
<span id="git-lint-options-module"></span><h2>git_lint.options module<a class="headerlink" href="#module-git_lint.options" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="module-git_lint.reporters">
<span id="git-lint-reporters-module"></span><h2>git_lint.reporters module<a class="headerlink" href="#module-git_lint.reporters" title="Permalink to this headline"></a></h2>
<dl class="function">
<dt id="git_lint.reporters.print_help">
<code class="descclassname">git_lint.reporters.</code><code class="descname">print_help</code><span class="sig-paren">(</span><em>options</em>, <em>name</em><span class="sig-paren">)</span><a class="reference internal" href="modules/git_lint/reporters.html#print_help"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#git_lint.reporters.print_help" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="git_lint.reporters.print_linters">
<code class="descclassname">git_lint.reporters.</code><code class="descname">print_linters</code><span class="sig-paren">(</span><em>config</em>, <em>broken_linter_names</em><span class="sig-paren">)</span><a class="reference internal" href="modules/git_lint/reporters.html#print_linters"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#git_lint.reporters.print_linters" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="git_lint.reporters.print_report">
<code class="descclassname">git_lint.reporters.</code><code class="descname">print_report</code><span class="sig-paren">(</span><em>results</em>, <em>unlintable_filenames</em>, <em>cant_lint_filenames</em>, <em>broken_linter_names</em>, <em>unfindable_filenames</em>, <em>options={'bylinter': True}</em><span class="sig-paren">)</span><a class="reference internal" href="modules/git_lint/reporters.html#print_report"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#git_lint.reporters.print_report" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="function">
<dt id="git_lint.reporters.print_version">
<code class="descclassname">git_lint.reporters.</code><code class="descname">print_version</code><span class="sig-paren">(</span><em>name</em>, <em>version</em><span class="sig-paren">)</span><a class="reference internal" href="modules/git_lint/reporters.html#print_version"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#git_lint.reporters.print_version" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</div>
<div class="section" id="module-git_lint">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-git_lint" title="Permalink to this headline"></a></h2>
</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="#">git_lint package</a><ul>
<li><a class="reference internal" href="#submodules">Submodules</a></li>
<li><a class="reference internal" href="#module-git_lint.git_lint">git_lint.git_lint module</a></li>
<li><a class="reference internal" href="#module-git_lint.option_handler">git_lint.option_handler module</a></li>
<li><a class="reference internal" href="#module-git_lint.options">git_lint.options module</a></li>
<li><a class="reference internal" href="#module-git_lint.reporters">git_lint.reporters module</a></li>
<li><a class="reference internal" href="#module-git_lint">Module contents</a></li>
</ul>
</li>
</ul>
<div class="relations">
<h3>Related Topics</h3>
<ul>
<li><a href="index.html">Documentation overview</a><ul>
</ul></li>
</ul>
</div>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="sources/git_lint.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">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
&copy;2016, Kenneth M. "Elf" Sternberg.
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 1.4.6</a>
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.9</a>
|
<a href="sources/git_lint.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>