Updated with latest version.
This commit is contained in:
parent
a31980b78d
commit
1a5d8921d2
|
@ -6,7 +6,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title><no title> — Git Lint 0.0.6 documentation</title>
|
||||
<title><no title> — 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" />
|
||||
|
@ -14,7 +14,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '0.0.6',
|
||||
VERSION: '0.0.7',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -23,7 +23,7 @@
|
|||
<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.6 documentation" href="index.html" />
|
||||
<link rel="top" title="Git Lint 0.0.7 documentation" href="index.html" />
|
||||
|
||||
<link rel="stylesheet" href="static/custom.css" type="text/css" />
|
||||
|
||||
|
|
10
authors.html
10
authors.html
|
@ -6,7 +6,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Credits — Git Lint 0.0.6 documentation</title>
|
||||
<title>Credits — 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" />
|
||||
|
@ -14,7 +14,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '0.0.6',
|
||||
VERSION: '0.0.7',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -23,7 +23,7 @@
|
|||
<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.6 documentation" href="index.html" />
|
||||
<link rel="top" title="Git Lint 0.0.7 documentation" href="index.html" />
|
||||
<link rel="next" title="History" href="history.html" />
|
||||
<link rel="prev" title="Contributing" href="contributing.html" />
|
||||
|
||||
|
@ -51,7 +51,9 @@
|
|||
</div>
|
||||
<div class="section" id="contributors">
|
||||
<h2>Contributors<a class="headerlink" href="#contributors" title="Permalink to this headline">¶</a></h2>
|
||||
<p>None yet. Why not be the first?</p>
|
||||
<ul class="simple">
|
||||
<li>Tino de Bruijn <<a class="reference external" href="mailto:work%40tino.io">work<span>@</span>tino<span>.</span>io</a>></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Contributing — Git Lint 0.0.6 documentation</title>
|
||||
<title>Contributing — 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" />
|
||||
|
@ -14,7 +14,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '0.0.6',
|
||||
VERSION: '0.0.7',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -23,7 +23,7 @@
|
|||
<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.6 documentation" href="index.html" />
|
||||
<link rel="top" title="Git Lint 0.0.7 documentation" href="index.html" />
|
||||
<link rel="next" title="Credits" href="authors.html" />
|
||||
<link rel="prev" title="Usage" href="usage.html" />
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Index — Git Lint 0.0.6 documentation</title>
|
||||
<title>Index — 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" />
|
||||
|
@ -15,7 +15,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '0.0.6',
|
||||
VERSION: '0.0.7',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<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.6 documentation" href="index.html" />
|
||||
<link rel="top" title="Git Lint 0.0.7 documentation" href="index.html" />
|
||||
|
||||
<link rel="stylesheet" href="static/custom.css" type="text/css" />
|
||||
|
||||
|
@ -44,18 +44,39 @@
|
|||
<h1 id="index">Index</h1>
|
||||
|
||||
<div class="genindex-jumpbox">
|
||||
<a href="#C"><strong>C</strong></a>
|
||||
<a href="#A"><strong>A</strong></a>
|
||||
| <a href="#C"><strong>C</strong></a>
|
||||
| <a href="#D"><strong>D</strong></a>
|
||||
| <a href="#E"><strong>E</strong></a>
|
||||
| <a href="#F"><strong>F</strong></a>
|
||||
| <a href="#G"><strong>G</strong></a>
|
||||
| <a href="#H"><strong>H</strong></a>
|
||||
| <a href="#L"><strong>L</strong></a>
|
||||
| <a href="#M"><strong>M</strong></a>
|
||||
| <a href="#O"><strong>O</strong></a>
|
||||
| <a href="#P"><strong>P</strong></a>
|
||||
| <a href="#R"><strong>R</strong></a>
|
||||
| <a href="#S"><strong>S</strong></a>
|
||||
| <a href="#T"><strong>T</strong></a>
|
||||
| <a href="#W"><strong>W</strong></a>
|
||||
|
||||
</div>
|
||||
<h2 id="A">A</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="git_lint.html#git_lint.option_handler.Arguments">Arguments (class in git_lint.option_handler)</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="git_lint.html#git_lint.option_handler.Arguments.arguments">arguments (git_lint.option_handler.Arguments attribute)</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="C">C</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
@ -63,6 +84,12 @@
|
|||
<dt><a href="git_lint.html#git_lint.option_handler.cleanup_options">cleanup_options() (in module git_lint.option_handler)</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="git_lint.html#git_lint.option_handler.Option.conflicts">conflicts (git_lint.option_handler.Option attribute)</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
</tr></table>
|
||||
|
||||
|
@ -86,7 +113,17 @@
|
|||
</dl></td>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="git_lint.html#git_lint.git_lint.executable_exists">executable_exists() (in module git_lint.git_lint)</a>
|
||||
<dt><a href="git_lint.html#git_lint.option_handler.Arguments.excluded">excluded (git_lint.option_handler.Arguments attribute)</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="F">F</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="git_lint.html#git_lint.option_handler.Arguments.filenames">filenames (git_lint.option_handler.Arguments attribute)</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
|
@ -148,10 +185,24 @@
|
|||
</dl></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="H">H</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="git_lint.html#git_lint.option_handler.Option.help">help (git_lint.option_handler.Option attribute)</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="L">L</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="git_lint.html#git_lint.git_lint.linter_exists">linter_exists() (in module git_lint.git_lint)</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="git_lint.html#git_lint.git_lint.Linters">Linters (class in git_lint.git_lint)</a>
|
||||
</dt>
|
||||
|
||||
|
@ -161,6 +212,10 @@
|
|||
<dt><a href="git_lint.html#git_lint.git_lint.load_config">load_config() (in module git_lint.git_lint)</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="git_lint.html#git_lint.option_handler.Option.long">long (git_lint.option_handler.Option attribute)</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
</tr></table>
|
||||
|
||||
|
@ -180,6 +235,16 @@
|
|||
</dl></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="O">O</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="git_lint.html#git_lint.option_handler.Option">Option (class in git_lint.option_handler)</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="P">P</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
@ -232,6 +297,10 @@
|
|||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="git_lint.html#git_lint.option_handler.Option.short">short (git_lint.option_handler.Option attribute)</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="git_lint.html#git_lint.git_lint.split_git_response">split_git_response() (in module git_lint.git_lint)</a>
|
||||
</dt>
|
||||
|
||||
|
@ -244,6 +313,16 @@
|
|||
</dl></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="T">T</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="git_lint.html#git_lint.option_handler.Option.takes">takes (git_lint.option_handler.Option attribute)</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
</tr></table>
|
||||
|
||||
<h2 id="W">W</h2>
|
||||
<table style="width: 100%" class="indextable genindextable"><tr>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>git_lint package — Git Lint 0.0.6 documentation</title>
|
||||
<title>git_lint package — 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" />
|
||||
|
@ -14,7 +14,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '0.0.6',
|
||||
VERSION: '0.0.7',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -23,7 +23,7 @@
|
|||
<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.6 documentation" href="index.html" />
|
||||
<link rel="top" title="Git Lint 0.0.7 documentation" href="index.html" />
|
||||
|
||||
<link rel="stylesheet" href="static/custom.css" type="text/css" />
|
||||
|
||||
|
@ -100,11 +100,6 @@ return code and the output of the lint process.</p>
|
|||
<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.executable_exists">
|
||||
<code class="descclassname">git_lint.git_lint.</code><code class="descname">executable_exists</code><span class="sig-paren">(</span><em>script</em>, <em>label</em><span class="sig-paren">)</span><a class="reference internal" href="modules/git_lint/git_lint.html#executable_exists"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#git_lint.git_lint.executable_exists" title="Permalink to this definition">¶</a></dt>
|
||||
<dd></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>
|
||||
|
@ -141,6 +136,11 @@ return code and the output of the lint process.</p>
|
|||
<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>
|
||||
|
@ -172,6 +172,66 @@ files for specific linters.</p>
|
|||
</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>
|
||||
|
@ -184,6 +244,10 @@ along with any extra arguments.</dd>
|
|||
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>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>History — Git Lint 0.0.6 documentation</title>
|
||||
<title>History — 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" />
|
||||
|
@ -14,7 +14,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '0.0.6',
|
||||
VERSION: '0.0.7',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -23,7 +23,7 @@
|
|||
<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.6 documentation" href="index.html" />
|
||||
<link rel="top" title="Git Lint 0.0.7 documentation" href="index.html" />
|
||||
<link rel="prev" title="Credits" href="authors.html" />
|
||||
|
||||
<link rel="stylesheet" href="static/custom.css" type="text/css" />
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Git Lint — Git Lint 0.0.6 documentation</title>
|
||||
<title>Git Lint — 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" />
|
||||
|
@ -14,7 +14,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '0.0.6',
|
||||
VERSION: '0.0.7',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -23,7 +23,7 @@
|
|||
<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.6 documentation" href="#" />
|
||||
<link rel="top" title="Git Lint 0.0.7 documentation" href="#" />
|
||||
<link rel="next" title="Git Lint: README" href="readme.html" />
|
||||
|
||||
<link rel="stylesheet" href="static/custom.css" type="text/css" />
|
||||
|
@ -54,6 +54,7 @@ repository or staging area.</p>
|
|||
<li class="toctree-l2"><a class="reference internal" href="readme.html#install">Install</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="readme.html#features">Features</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="readme.html#acknowledgements">Acknowledgements</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="readme.html#to-do">To do</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="readme.html#disclaimer">Disclaimer</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Installation — Git Lint 0.0.6 documentation</title>
|
||||
<title>Installation — 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" />
|
||||
|
@ -14,7 +14,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '0.0.6',
|
||||
VERSION: '0.0.7',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -23,7 +23,7 @@
|
|||
<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.6 documentation" href="index.html" />
|
||||
<link rel="top" title="Git Lint 0.0.7 documentation" href="index.html" />
|
||||
<link rel="next" title="Usage" href="usage.html" />
|
||||
<link rel="prev" title="Git Lint: README" href="readme.html" />
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>git-lint(1) — Git Lint 0.0.6 documentation</title>
|
||||
<title>git-lint(1) — 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" />
|
||||
|
@ -14,7 +14,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '0.0.6',
|
||||
VERSION: '0.0.7',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -23,7 +23,7 @@
|
|||
<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.6 documentation" href="index.html" />
|
||||
<link rel="top" title="Git Lint 0.0.7 documentation" href="index.html" />
|
||||
|
||||
<link rel="stylesheet" href="static/custom.css" type="text/css" />
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>git_lint — Git Lint 0.0.6 documentation</title>
|
||||
<title>git_lint — 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" />
|
||||
|
@ -14,7 +14,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '0.0.6',
|
||||
VERSION: '0.0.7',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -23,7 +23,7 @@
|
|||
<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.6 documentation" href="index.html" />
|
||||
<link rel="top" title="Git Lint 0.0.7 documentation" href="index.html" />
|
||||
|
||||
<link rel="stylesheet" href="static/custom.css" type="text/css" />
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>git_lint.git_lint — Git Lint 0.0.6 documentation</title>
|
||||
<title>git_lint.git_lint — 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" />
|
||||
|
@ -14,7 +14,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '../../',
|
||||
VERSION: '0.0.6',
|
||||
VERSION: '0.0.7',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -23,7 +23,7 @@
|
|||
<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.6 documentation" href="../../index.html" />
|
||||
<link rel="top" title="Git Lint 0.0.7 documentation" href="../../index.html" />
|
||||
<link rel="up" title="Module code" href="../index.html" />
|
||||
|
||||
<link rel="stylesheet" href="../../static/custom.css" type="text/css" />
|
||||
|
@ -52,11 +52,18 @@
|
|||
<span class="kn">import</span> <span class="nn">subprocess</span>
|
||||
<span class="kn">import</span> <span class="nn">sys</span>
|
||||
<span class="kn">import</span> <span class="nn">pprint</span>
|
||||
|
||||
<span class="k">try</span><span class="p">:</span>
|
||||
<span class="kn">import</span> <span class="nn">configparser</span>
|
||||
<span class="k">except</span> <span class="ne">ImportError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
|
||||
<span class="kn">import</span> <span class="nn">ConfigParser</span> <span class="k">as</span> <span class="nn">configparser</span>
|
||||
|
||||
<span class="k">try</span><span class="p">:</span> <span class="c1"># noqa: F401</span>
|
||||
<span class="kn">from</span> <span class="nn">typing</span> <span class="k">import</span> <span class="n">Dict</span><span class="p">,</span> <span class="n">List</span><span class="p">,</span> <span class="n">Text</span><span class="p">,</span> <span class="n">Any</span><span class="p">,</span> <span class="n">Optional</span><span class="p">,</span> <span class="n">Union</span><span class="p">,</span> <span class="n">Callable</span><span class="p">,</span> <span class="n">Tuple</span> <span class="c1"># noqa: F401</span>
|
||||
<span class="k">except</span><span class="p">:</span> <span class="c1"># noqa: F401</span>
|
||||
<span class="k">pass</span> <span class="c1"># noqa: F401</span>
|
||||
|
||||
|
||||
<span class="n">_</span> <span class="o">=</span> <span class="n">gettext</span><span class="o">.</span><span class="n">gettext</span>
|
||||
|
||||
|
||||
|
@ -82,14 +89,14 @@
|
|||
|
||||
<span class="k">def</span> <span class="nf">find_config_file</span><span class="p">(</span><span class="n">options</span><span class="p">,</span> <span class="n">base</span><span class="p">):</span>
|
||||
<span class="sd">""" Returns the configuration file from a prioritized list of locations.</span>
|
||||
<span class="sd"> </span>
|
||||
|
||||
<span class="sd"> Locations are prioritized as:</span>
|
||||
<span class="sd"> 1. From the command line. Fail if specified but not found</span>
|
||||
<span class="sd"> 2. The repository's root directory, as the file .git-lint</span>
|
||||
<span class="sd"> 3. The repository's root directory, as the file .git-lint/config</span>
|
||||
<span class="sd"> 4. The user's home directory, as file .git-lint</span>
|
||||
<span class="sd"> 5. The user's home directory, as the file .git-lint/config</span>
|
||||
<span class="sd"> </span>
|
||||
|
||||
<span class="sd"> If no configuration file is found, this is an error.</span>
|
||||
<span class="sd"> """</span>
|
||||
|
||||
|
@ -210,25 +217,23 @@
|
|||
<span class="c1"># \___|_||_\___\__|_\_\ |_|_|_||_\__\___|_| /__/</span>
|
||||
<span class="c1">#</span>
|
||||
|
||||
<div class="viewcode-block" id="executable_exists"><a class="viewcode-back" href="../../git_lint.html#git_lint.git_lint.executable_exists">[docs]</a><span class="k">def</span> <span class="nf">executable_exists</span><span class="p">(</span><span class="n">script</span><span class="p">,</span> <span class="n">label</span><span class="p">):</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="nb">len</span><span class="p">(</span><span class="n">script</span><span class="p">):</span>
|
||||
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span>
|
||||
<span class="n">_</span><span class="p">(</span><span class="s1">'Syntax error in command configuration for </span><span class="si">{}</span><span class="s1"> '</span><span class="p">)</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">label</span><span class="p">))</span>
|
||||
<div class="viewcode-block" id="linter_exists"><a class="viewcode-back" href="../../git_lint.html#git_lint.git_lint.linter_exists">[docs]</a><span class="k">def</span> <span class="nf">linter_exists</span><span class="p">(</span><span class="n">linter</span><span class="p">,</span> <span class="n">label</span><span class="p">):</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="nb">len</span><span class="p">(</span><span class="n">linter</span><span class="p">):</span>
|
||||
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s1">'Syntax error in linter configuration for </span><span class="si">{}</span><span class="s1"> '</span><span class="p">)</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">label</span><span class="p">))</span>
|
||||
|
||||
<span class="n">scriptname</span> <span class="o">=</span> <span class="n">script</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">' '</span><span class="p">)</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="nb">len</span><span class="p">(</span><span class="n">scriptname</span><span class="p">):</span>
|
||||
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span>
|
||||
<span class="n">_</span><span class="p">(</span><span class="s1">'Syntax error in command configuration for </span><span class="si">{}</span><span class="s1"> '</span><span class="p">)</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">label</span><span class="p">))</span>
|
||||
<span class="n">lintername</span> <span class="o">=</span> <span class="n">linter</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">' '</span><span class="p">)</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="nb">len</span><span class="p">(</span><span class="n">lintername</span><span class="p">):</span>
|
||||
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s1">'Syntax error in linter configuration for </span><span class="si">{}</span><span class="s1"> '</span><span class="p">)</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">label</span><span class="p">))</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">is_executable</span><span class="p">(</span><span class="n">path</span><span class="p">):</span>
|
||||
<span class="k">return</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">path</span><span class="p">)</span> <span class="ow">and</span> <span class="n">os</span><span class="o">.</span><span class="n">access</span><span class="p">(</span><span class="n">path</span><span class="p">,</span> <span class="n">os</span><span class="o">.</span><span class="n">X_OK</span><span class="p">)</span>
|
||||
|
||||
<span class="k">if</span> <span class="n">scriptname</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s1">'/'</span><span class="p">):</span>
|
||||
<span class="k">return</span> <span class="p">(</span><span class="n">is_executable</span><span class="p">(</span><span class="n">scriptname</span><span class="p">)</span> <span class="ow">and</span> <span class="n">scriptname</span><span class="p">)</span> <span class="ow">or</span> <span class="kc">None</span>
|
||||
<span class="k">if</span> <span class="n">lintername</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s1">'/'</span><span class="p">):</span>
|
||||
<span class="k">return</span> <span class="p">(</span><span class="n">is_executable</span><span class="p">(</span><span class="n">lintername</span><span class="p">)</span> <span class="ow">and</span> <span class="n">lintername</span><span class="p">)</span> <span class="ow">or</span> <span class="kc">None</span>
|
||||
|
||||
<span class="c1"># shutil.which() doesn't appear until Python 3, darnit.</span>
|
||||
<span class="n">possibles</span> <span class="o">=</span> <span class="p">[</span><span class="n">path</span> <span class="k">for</span> <span class="n">path</span> <span class="ow">in</span>
|
||||
<span class="p">[</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">path</span><span class="p">,</span> <span class="n">scriptname</span><span class="p">)</span>
|
||||
<span class="p">[</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">path</span><span class="p">,</span> <span class="n">lintername</span><span class="p">)</span>
|
||||
<span class="k">for</span> <span class="n">path</span> <span class="ow">in</span> <span class="n">os</span><span class="o">.</span><span class="n">environ</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">'PATH'</span><span class="p">)</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">':'</span><span class="p">)]</span>
|
||||
<span class="k">if</span> <span class="n">is_executable</span><span class="p">(</span><span class="n">path</span><span class="p">)]</span>
|
||||
|
||||
|
@ -236,10 +241,9 @@
|
|||
|
||||
|
||||
<div class="viewcode-block" id="get_linter_status"><a class="viewcode-back" href="../../git_lint.html#git_lint.git_lint.get_linter_status">[docs]</a><span class="k">def</span> <span class="nf">get_linter_status</span><span class="p">(</span><span class="n">config</span><span class="p">):</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">get_working_linter_names</span><span class="p">(</span><span class="n">config</span><span class="p">):</span>
|
||||
<span class="k">return</span> <span class="p">[</span><span class="n">i</span><span class="o">.</span><span class="n">name</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">config</span>
|
||||
<span class="k">if</span> <span class="n">executable_exists</span><span class="p">(</span><span class="n">i</span><span class="o">.</span><span class="n">linter</span><span class="p">[</span><span class="s1">'command'</span><span class="p">],</span> <span class="n">i</span><span class="o">.</span><span class="n">name</span><span class="p">)]</span>
|
||||
<span class="k">if</span> <span class="n">linter_exists</span><span class="p">(</span><span class="n">i</span><span class="o">.</span><span class="n">linter</span><span class="p">[</span><span class="s1">'command'</span><span class="p">],</span> <span class="n">i</span><span class="o">.</span><span class="n">name</span><span class="p">)]</span>
|
||||
|
||||
<span class="n">working_linter_names</span> <span class="o">=</span> <span class="n">get_working_linter_names</span><span class="p">(</span><span class="n">config</span><span class="p">)</span>
|
||||
<span class="n">broken_linter_names</span> <span class="o">=</span> <span class="p">(</span><span class="nb">set</span><span class="p">([</span><span class="n">i</span><span class="o">.</span><span class="n">name</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="n">config</span><span class="p">])</span> <span class="o">-</span> <span class="nb">set</span><span class="p">(</span><span class="n">working_linter_names</span><span class="p">))</span>
|
||||
|
@ -314,6 +318,11 @@
|
|||
|
||||
<span class="k">return</span> <span class="n">check_for_conflicts</span><span class="p">(</span><span class="n">parse_stream</span><span class="p">([],</span> <span class="n">stream</span><span class="p">))</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">revision_list</span><span class="p">():</span>
|
||||
<span class="n">cmd</span> <span class="o">=</span> <span class="p">[</span><span class="s1">'diff'</span><span class="p">,</span> <span class="s1">'--name-only'</span><span class="p">,</span> <span class="s1">'-z'</span><span class="p">,</span> <span class="n">options</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">'revision'</span><span class="p">)]</span>
|
||||
<span class="k">return</span> <span class="p">[</span><span class="n">entry</span> <span class="k">for</span> <span class="n">entry</span> <span class="ow">in</span> <span class="n">get_git_response</span><span class="p">(</span><span class="n">cmd</span><span class="p">)</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s1">u'</span><span class="se">\x00</span><span class="s1">'</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">entry</span><span class="p">)</span> <span class="o">></span> <span class="mi">0</span><span class="p">]</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">staging_list</span><span class="p">():</span>
|
||||
<span class="sd">""" Return the list of files added or modified to the stage """</span>
|
||||
|
||||
|
@ -345,6 +354,9 @@
|
|||
<span class="n">working_directory_trans</span> <span class="o">=</span> <span class="n">base_file_filter</span>
|
||||
|
||||
<span class="n">file_list_generator</span> <span class="o">=</span> <span class="n">working_list</span>
|
||||
<span class="k">if</span> <span class="s1">'revision'</span> <span class="ow">in</span> <span class="n">options</span><span class="p">:</span>
|
||||
<span class="n">file_list_generator</span> <span class="o">=</span> <span class="n">revision_list</span>
|
||||
<span class="n">working_directory_trans</span> <span class="o">=</span> <span class="n">base_file_filter</span>
|
||||
<span class="k">if</span> <span class="s1">'all'</span> <span class="ow">in</span> <span class="n">options</span><span class="p">:</span>
|
||||
<span class="n">file_list_generator</span> <span class="o">=</span> <span class="n">all_list</span>
|
||||
<span class="k">if</span> <span class="s1">'staging'</span> <span class="ow">in</span> <span class="n">options</span><span class="p">:</span>
|
||||
|
@ -463,6 +475,9 @@
|
|||
|
||||
|
||||
<div class="viewcode-block" id="run_linters"><a class="viewcode-back" href="../../git_lint.html#git_lint.git_lint.run_linters">[docs]</a><span class="k">def</span> <span class="nf">run_linters</span><span class="p">(</span><span class="n">options</span><span class="p">,</span> <span class="n">config</span><span class="p">,</span> <span class="n">extras</span><span class="o">=</span><span class="p">[]):</span>
|
||||
<span class="k">if</span> <span class="s1">'pr'</span> <span class="ow">in</span> <span class="n">options</span><span class="p">:</span>
|
||||
<span class="n">options</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="s1">'pr'</span><span class="p">)</span>
|
||||
<span class="n">options</span><span class="p">[</span><span class="s1">'revision'</span><span class="p">]</span> <span class="o">=</span> <span class="s1">'HEAD^..HEAD'</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">build_config_subset</span><span class="p">(</span><span class="n">keys</span><span class="p">):</span>
|
||||
<span class="sd">""" Returns a subset of the configuration, with only those linters mentioned in keys """</span>
|
||||
|
@ -472,17 +487,25 @@
|
|||
<span class="n">all_filenames</span><span class="p">,</span> <span class="n">unfindable_filenames</span> <span class="o">=</span> <span class="n">get_filelist</span><span class="p">(</span><span class="n">options</span><span class="p">,</span> <span class="n">extras</span><span class="p">)</span>
|
||||
|
||||
<span class="n">is_lintable</span> <span class="o">=</span> <span class="n">MatchFilter</span><span class="p">(</span><span class="n">config</span><span class="p">)</span>
|
||||
|
||||
<span class="n">lintable_filenames</span> <span class="o">=</span> <span class="nb">set</span><span class="p">([</span><span class="n">filename</span> <span class="k">for</span> <span class="n">filename</span> <span class="ow">in</span> <span class="n">all_filenames</span>
|
||||
<span class="k">if</span> <span class="n">is_lintable</span><span class="p">(</span><span class="n">filename</span><span class="p">)])</span>
|
||||
|
||||
<span class="n">unlintable_filenames</span> <span class="o">=</span> <span class="nb">set</span><span class="p">(</span><span class="n">all_filenames</span><span class="p">)</span> <span class="o">-</span> <span class="n">lintable_filenames</span>
|
||||
|
||||
<span class="c1"># Filter the linter config down to the selected ones.</span>
|
||||
<span class="k">if</span> <span class="s1">'only'</span> <span class="ow">in</span> <span class="n">options</span><span class="p">:</span>
|
||||
<span class="n">config</span> <span class="o">=</span> <span class="p">[</span><span class="n">linter</span> <span class="k">for</span> <span class="n">linter</span> <span class="ow">in</span> <span class="n">config</span>
|
||||
<span class="k">if</span> <span class="n">linter</span><span class="o">.</span><span class="n">name</span> <span class="ow">in</span> <span class="n">options</span><span class="p">[</span><span class="s1">'only'</span><span class="p">]]</span>
|
||||
<span class="k">elif</span> <span class="s1">'exclude'</span> <span class="ow">in</span> <span class="n">options</span><span class="p">:</span>
|
||||
<span class="n">config</span> <span class="o">=</span> <span class="p">[</span><span class="n">linter</span> <span class="k">for</span> <span class="n">linter</span> <span class="ow">in</span> <span class="n">config</span>
|
||||
<span class="k">if</span> <span class="n">linter</span><span class="o">.</span><span class="n">name</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">options</span><span class="p">[</span><span class="s1">'exclude'</span><span class="p">]]</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="nb">len</span><span class="p">(</span><span class="n">config</span><span class="p">):</span>
|
||||
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s1">'No linters left to run! Be less strict with --only and --exclude.'</span><span class="p">)</span>
|
||||
|
||||
<span class="n">working_linter_names</span><span class="p">,</span> <span class="n">broken_linter_names</span> <span class="o">=</span> <span class="n">get_linter_status</span><span class="p">(</span><span class="n">config</span><span class="p">)</span>
|
||||
|
||||
<span class="n">cant_lint_filter</span> <span class="o">=</span> <span class="n">MatchFilter</span><span class="p">(</span><span class="n">build_config_subset</span><span class="p">(</span>
|
||||
<span class="n">broken_linter_names</span><span class="p">))</span>
|
||||
|
||||
<span class="n">cant_lint_filenames</span> <span class="o">=</span> <span class="p">[</span><span class="n">filename</span> <span class="k">for</span> <span class="n">filename</span> <span class="ow">in</span> <span class="n">lintable_filenames</span>
|
||||
<span class="k">if</span> <span class="n">cant_lint_filter</span><span class="p">(</span><span class="n">filename</span><span class="p">)]</span>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>git_lint.option_handler — Git Lint 0.0.6 documentation</title>
|
||||
<title>git_lint.option_handler — 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" />
|
||||
|
@ -14,7 +14,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '../../',
|
||||
VERSION: '0.0.6',
|
||||
VERSION: '0.0.7',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -23,7 +23,7 @@
|
|||
<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.6 documentation" href="../../index.html" />
|
||||
<link rel="top" title="Git Lint 0.0.7 documentation" href="../../index.html" />
|
||||
<link rel="up" title="Module code" href="../index.html" />
|
||||
|
||||
<link rel="stylesheet" href="../../static/custom.css" type="text/css" />
|
||||
|
@ -45,8 +45,18 @@
|
|||
<span class="c1"># Author: Elf M. Sternberg</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">functools</span> <span class="k">import</span> <span class="n">reduce</span>
|
||||
<span class="kn">from</span> <span class="nn">collections</span> <span class="k">import</span> <span class="n">namedtuple</span>
|
||||
<span class="kn">import</span> <span class="nn">getopt</span>
|
||||
|
||||
<span class="k">try</span><span class="p">:</span> <span class="c1"># noqa: F401</span>
|
||||
<span class="kn">from</span> <span class="nn">typing</span> <span class="k">import</span> <span class="n">Dict</span><span class="p">,</span> <span class="n">List</span><span class="p">,</span> <span class="n">Text</span><span class="p">,</span> <span class="n">Any</span><span class="p">,</span> <span class="n">Optional</span><span class="p">,</span> <span class="n">Union</span><span class="p">,</span> <span class="n">Callable</span><span class="p">,</span> <span class="n">Tuple</span> <span class="c1"># noqa: F401</span>
|
||||
<span class="k">except</span><span class="p">:</span> <span class="c1"># noqa: F401</span>
|
||||
<span class="k">pass</span> <span class="c1"># noqa: F401</span>
|
||||
|
||||
|
||||
<span class="n">Option</span> <span class="o">=</span> <span class="n">namedtuple</span><span class="p">(</span><span class="s1">'Option'</span><span class="p">,</span> <span class="p">[</span><span class="s1">'short'</span><span class="p">,</span> <span class="s1">'long'</span><span class="p">,</span> <span class="s1">'takes'</span><span class="p">,</span> <span class="s1">'help'</span><span class="p">,</span> <span class="s1">'conflicts'</span><span class="p">])</span> <span class="c1"># type: str, str, str, str, List[str]</span>
|
||||
<span class="n">Arguments</span> <span class="o">=</span> <span class="n">namedtuple</span><span class="p">(</span><span class="s1">'Arguments'</span><span class="p">,</span> <span class="p">[</span><span class="s1">'arguments'</span><span class="p">,</span> <span class="s1">'filenames'</span><span class="p">,</span> <span class="s1">'excluded'</span><span class="p">])</span> <span class="c1"># type: Dict[str, str], List[str], List[str]</span>
|
||||
|
||||
<span class="c1"># This was a lot shorter and smarter in Hy...</span>
|
||||
|
||||
<span class="c1"># A lot of what you see here is separated from git_lint itself, since this will not be</span>
|
||||
|
@ -60,6 +70,7 @@
|
|||
|
||||
|
||||
<div class="viewcode-block" id="cleanup_options"><a class="viewcode-back" href="../../git_lint.html#git_lint.option_handler.cleanup_options">[docs]</a><span class="k">def</span> <span class="nf">cleanup_options</span><span class="p">(</span><span class="n">options</span><span class="p">,</span> <span class="n">commandline</span><span class="p">):</span>
|
||||
<span class="c1"># type: (List[Option], List[str]) -> Arguments</span>
|
||||
<span class="sd">"""Takes a table of options and the commandline, and returns a</span>
|
||||
<span class="sd"> dictionary of those options that appear on the commandline</span>
|
||||
<span class="sd"> along with any extra arguments.</span>
|
||||
|
@ -67,41 +78,50 @@
|
|||
<span class="sd"> :param List(Tuple (string, string, boolean, string, List(string))) options,</span>
|
||||
<span class="sd"> The table of options: One-letter option, long option, takes arguments,</span>
|
||||
<span class="sd"> Help text, list of (long) options superseded by this one.</span>
|
||||
|
||||
<span class="sd"> : param List(strings) commandline</span>
|
||||
<span class="sd"> The arguments as received by the start-up process</span>
|
||||
|
||||
<span class="sd"> : returns List(strings), List(strings), List(strings)</span>
|
||||
<span class="sd"> The longopt dictionary of arguments and associated values (if any)</span>
|
||||
<span class="sd"> The list of filenames left after argument processing</span>
|
||||
<span class="sd"> The longopt list of arguments that were excluded by argument precedence</span>
|
||||
<span class="sd"> """</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">make_option_streamliner</span><span class="p">(</span><span class="n">options</span><span class="p">):</span>
|
||||
<span class="c1"># type: (List[Option]) -> Callable[[Dict[str, str], Option], Dict[str, str]]</span>
|
||||
|
||||
<span class="sd">"""Takes a list of option tuples, and returns a function that takes</span>
|
||||
<span class="sd"> the output of getopt and reduces it to the longopt key and</span>
|
||||
<span class="sd"> associated values as a dictionary.</span>
|
||||
<span class="sd"> """</span>
|
||||
|
||||
<span class="n">fullset</span> <span class="o">=</span> <span class="p">{}</span>
|
||||
<span class="n">fullset</span> <span class="o">=</span> <span class="p">{}</span> <span class="c1"># type: Dict[str, str]</span>
|
||||
<span class="k">for</span> <span class="n">option</span> <span class="ow">in</span> <span class="n">options</span><span class="p">:</span>
|
||||
<span class="k">if</span> <span class="n">option</span><span class="p">[</span><span class="mi">1</span><span class="p">]:</span>
|
||||
<span class="n">fullset</span><span class="p">[</span><span class="s1">'--'</span> <span class="o">+</span> <span class="n">option</span><span class="p">[</span><span class="mi">1</span><span class="p">]]</span> <span class="o">=</span> <span class="n">option</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
|
||||
<span class="k">if</span> <span class="n">option</span><span class="p">[</span><span class="mi">0</span><span class="p">]:</span>
|
||||
<span class="n">fullset</span><span class="p">[</span><span class="s1">'-'</span> <span class="o">+</span> <span class="n">option</span><span class="p">[</span><span class="mi">0</span><span class="p">]]</span> <span class="o">=</span> <span class="n">option</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
|
||||
<span class="k">if</span> <span class="n">option</span><span class="o">.</span><span class="n">long</span><span class="p">:</span>
|
||||
<span class="n">fullset</span><span class="p">[</span><span class="s1">'--'</span> <span class="o">+</span> <span class="n">option</span><span class="o">.</span><span class="n">long</span><span class="p">]</span> <span class="o">=</span> <span class="n">option</span><span class="o">.</span><span class="n">long</span>
|
||||
<span class="k">if</span> <span class="n">option</span><span class="o">.</span><span class="n">short</span><span class="p">:</span>
|
||||
<span class="n">fullset</span><span class="p">[</span><span class="s1">'-'</span> <span class="o">+</span> <span class="n">option</span><span class="o">.</span><span class="n">short</span><span class="p">]</span> <span class="o">=</span> <span class="n">option</span><span class="o">.</span><span class="n">long</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">streamliner</span><span class="p">(</span><span class="n">acc</span><span class="p">,</span> <span class="n">it</span><span class="p">):</span>
|
||||
<span class="c1"># type: (Dict[str, str], Option) -> Dict[str, str]</span>
|
||||
<span class="n">acc</span><span class="p">[</span><span class="n">fullset</span><span class="p">[</span><span class="n">it</span><span class="p">[</span><span class="mi">0</span><span class="p">]]]</span> <span class="o">=</span> <span class="n">it</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
|
||||
<span class="k">return</span> <span class="n">acc</span>
|
||||
|
||||
<span class="k">return</span> <span class="n">streamliner</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">remove_conflicted_options</span><span class="p">(</span><span class="n">options</span><span class="p">,</span> <span class="n">request</span><span class="p">):</span>
|
||||
<span class="c1"># type: (List[Option], Dict[str, str]) -> Tuple[List[str], List[str]]</span>
|
||||
<span class="sd">"""Takes our list of option tuples, and a cleaned copy of what was</span>
|
||||
<span class="sd"> requested from getopt, and returns a copy of the request</span>
|
||||
<span class="sd"> without any options that are marked as superseded, along with</span>
|
||||
<span class="sd"> the list of superseded options</span>
|
||||
<span class="sd"> """</span>
|
||||
<span class="k">def</span> <span class="nf">get_excluded_keys</span><span class="p">(</span><span class="n">memo</span><span class="p">,</span> <span class="n">opt</span><span class="p">):</span>
|
||||
<span class="k">return</span> <span class="n">memo</span> <span class="o">+</span> <span class="p">((</span><span class="nb">len</span><span class="p">(</span><span class="n">opt</span><span class="p">)</span> <span class="o">></span> <span class="mi">4</span> <span class="ow">and</span> <span class="n">opt</span><span class="p">[</span><span class="mi">4</span><span class="p">])</span> <span class="ow">or</span> <span class="p">[])</span>
|
||||
<span class="k">def</span> <span class="nf">get_excluded_keys</span><span class="p">(</span><span class="n">memo</span><span class="p">,</span> <span class="n">option</span><span class="p">):</span>
|
||||
<span class="k">return</span> <span class="n">memo</span> <span class="o">+</span> <span class="n">option</span><span class="o">.</span><span class="n">conflicts</span>
|
||||
|
||||
<span class="n">keys</span> <span class="o">=</span> <span class="n">request</span><span class="o">.</span><span class="n">keys</span><span class="p">()</span>
|
||||
<span class="n">marked</span> <span class="o">=</span> <span class="p">[</span><span class="n">option</span> <span class="k">for</span> <span class="n">option</span> <span class="ow">in</span> <span class="n">options</span> <span class="k">if</span> <span class="n">option</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="ow">in</span> <span class="n">keys</span><span class="p">]</span>
|
||||
<span class="n">marked</span> <span class="o">=</span> <span class="p">[</span><span class="n">option</span> <span class="k">for</span> <span class="n">option</span> <span class="ow">in</span> <span class="n">options</span> <span class="k">if</span> <span class="n">option</span><span class="o">.</span><span class="n">long</span> <span class="ow">in</span> <span class="n">keys</span><span class="p">]</span>
|
||||
<span class="n">exclude</span> <span class="o">=</span> <span class="n">reduce</span><span class="p">(</span><span class="n">get_excluded_keys</span><span class="p">,</span> <span class="n">marked</span><span class="p">,</span> <span class="p">[])</span>
|
||||
<span class="n">excluded</span> <span class="o">=</span> <span class="p">[</span><span class="n">key</span> <span class="k">for</span> <span class="n">key</span> <span class="ow">in</span> <span class="n">keys</span> <span class="k">if</span> <span class="n">key</span> <span class="ow">in</span> <span class="n">exclude</span><span class="p">]</span>
|
||||
<span class="n">cleaned</span> <span class="o">=</span> <span class="p">{</span><span class="n">key</span><span class="p">:</span> <span class="n">request</span><span class="p">[</span><span class="n">key</span><span class="p">]</span> <span class="k">for</span> <span class="n">key</span> <span class="ow">in</span> <span class="n">keys</span>
|
||||
|
@ -109,12 +129,12 @@
|
|||
<span class="k">return</span> <span class="p">(</span><span class="n">cleaned</span><span class="p">,</span> <span class="n">excluded</span><span class="p">)</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">shortoptstogo</span><span class="p">(</span><span class="n">i</span><span class="p">):</span>
|
||||
<span class="k">return</span> <span class="n">i</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">+</span> <span class="p">((</span><span class="n">i</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="ow">and</span> <span class="s1">':'</span><span class="p">)</span> <span class="ow">or</span> <span class="s1">''</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="n">i</span><span class="o">.</span><span class="n">short</span> <span class="o">+</span> <span class="p">((</span><span class="n">i</span><span class="o">.</span><span class="n">takes</span> <span class="ow">and</span> <span class="s1">':'</span><span class="p">)</span> <span class="ow">or</span> <span class="s1">''</span><span class="p">)</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">longoptstogo</span><span class="p">(</span><span class="n">i</span><span class="p">):</span>
|
||||
<span class="k">return</span> <span class="n">i</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">+</span> <span class="p">((</span><span class="n">i</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span> <span class="ow">and</span> <span class="s1">'='</span><span class="p">)</span> <span class="ow">or</span> <span class="s1">''</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="n">i</span><span class="o">.</span><span class="n">long</span> <span class="o">+</span> <span class="p">((</span><span class="n">i</span><span class="o">.</span><span class="n">takes</span> <span class="ow">and</span> <span class="s1">'='</span><span class="p">)</span> <span class="ow">or</span> <span class="s1">''</span><span class="p">)</span>
|
||||
|
||||
<span class="n">optstringsshort</span> <span class="o">=</span> <span class="s1">''</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="n">shortoptstogo</span><span class="p">(</span><span class="n">opt</span><span class="p">)</span> <span class="k">for</span> <span class="n">opt</span> <span class="ow">in</span> <span class="n">options</span><span class="p">])</span>
|
||||
<span class="n">optstringsshort</span> <span class="o">=</span> <span class="s1">''</span><span class="o">.</span><span class="n">join</span><span class="p">([</span><span class="n">shortoptstogo</span><span class="p">(</span><span class="n">opt</span><span class="p">)</span> <span class="k">for</span> <span class="n">opt</span> <span class="ow">in</span> <span class="n">options</span> <span class="k">if</span> <span class="n">opt</span><span class="o">.</span><span class="n">short</span><span class="p">])</span>
|
||||
<span class="n">optstringslong</span> <span class="o">=</span> <span class="p">[</span><span class="n">longoptstogo</span><span class="p">(</span><span class="n">opt</span><span class="p">)</span> <span class="k">for</span> <span class="n">opt</span> <span class="ow">in</span> <span class="n">options</span><span class="p">]</span>
|
||||
<span class="p">(</span><span class="n">chosen_options</span><span class="p">,</span> <span class="n">filenames</span><span class="p">)</span> <span class="o">=</span> <span class="n">getopt</span><span class="o">.</span><span class="n">getopt</span><span class="p">(</span><span class="n">commandline</span><span class="p">[</span><span class="mi">1</span><span class="p">:],</span>
|
||||
<span class="n">optstringsshort</span><span class="p">,</span>
|
||||
|
@ -127,7 +147,7 @@
|
|||
<span class="p">(</span><span class="n">ret</span><span class="p">,</span> <span class="n">excluded</span><span class="p">)</span> <span class="o">=</span> <span class="n">remove_conflicted_options</span><span class="p">(</span>
|
||||
<span class="n">options</span><span class="p">,</span> <span class="n">reduce</span><span class="p">(</span><span class="n">streamline_options</span><span class="p">,</span> <span class="n">chosen_options</span><span class="p">,</span> <span class="p">{}))</span>
|
||||
|
||||
<span class="k">return</span> <span class="p">(</span><span class="n">ret</span><span class="p">,</span> <span class="n">filenames</span><span class="p">,</span> <span class="n">excluded</span><span class="p">)</span></div>
|
||||
<span class="k">return</span> <span class="n">Arguments</span><span class="p">(</span><span class="n">ret</span><span class="p">,</span> <span class="n">filenames</span><span class="p">,</span> <span class="n">excluded</span><span class="p">)</span></div>
|
||||
</pre></div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>git_lint.reporters — Git Lint 0.0.6 documentation</title>
|
||||
<title>git_lint.reporters — 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" />
|
||||
|
@ -14,7 +14,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '../../',
|
||||
VERSION: '0.0.6',
|
||||
VERSION: '0.0.7',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -23,7 +23,7 @@
|
|||
<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.6 documentation" href="../../index.html" />
|
||||
<link rel="top" title="Git Lint 0.0.7 documentation" href="../../index.html" />
|
||||
<link rel="up" title="Module code" href="../index.html" />
|
||||
|
||||
<link rel="stylesheet" href="../../static/custom.css" type="text/css" />
|
||||
|
@ -42,6 +42,7 @@
|
|||
|
||||
<h1>Source code for git_lint.reporters</h1><div class="highlight"><pre>
|
||||
<span></span><span class="kn">from</span> <span class="nn">__future__</span> <span class="k">import</span> <span class="n">print_function</span>
|
||||
<span class="kn">from</span> <span class="nn">functools</span> <span class="k">import</span> <span class="n">reduce</span>
|
||||
<span class="kn">from</span> <span class="nn">.git_lint</span> <span class="k">import</span> <span class="n">load_config</span><span class="p">,</span> <span class="n">run_linters</span><span class="p">,</span> <span class="n">git_base</span>
|
||||
<span class="kn">import</span> <span class="nn">operator</span>
|
||||
<span class="kn">import</span> <span class="nn">gettext</span>
|
||||
|
@ -106,7 +107,7 @@
|
|||
<div class="viewcode-block" id="print_help"><a class="viewcode-back" href="../../git_lint.html#git_lint.reporters.print_help">[docs]</a><span class="k">def</span> <span class="nf">print_help</span><span class="p">(</span><span class="n">options</span><span class="p">,</span> <span class="n">name</span><span class="p">):</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="n">_</span><span class="p">(</span><span class="s1">'Usage: </span><span class="si">{}</span><span class="s1"> [options] [filenames]'</span><span class="p">)</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">name</span><span class="p">))</span>
|
||||
<span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">options</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s1">' -</span><span class="si">{:<1}</span><span class="s1"> --</span><span class="si">{:<12}</span><span class="s1"> </span><span class="si">{}</span><span class="s1">'</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">item</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">item</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="n">item</span><span class="p">[</span><span class="mi">3</span><span class="p">]))</span></div>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s1">' </span><span class="si">{:<2}</span><span class="s1"> --</span><span class="si">{:<12}</span><span class="s1"> </span><span class="si">{}</span><span class="s1">'</span><span class="o">.</span><span class="n">format</span><span class="p">((</span><span class="n">item</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="ow">and</span> <span class="p">(</span><span class="s1">'-'</span> <span class="o">+</span> <span class="n">item</span><span class="p">[</span><span class="mi">0</span><span class="p">]))</span> <span class="ow">or</span> <span class="s1">''</span><span class="p">,</span> <span class="n">item</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="n">item</span><span class="p">[</span><span class="mi">3</span><span class="p">]))</span></div>
|
||||
|
||||
|
||||
<div class="viewcode-block" id="print_version"><a class="viewcode-back" href="../../git_lint.html#git_lint.reporters.print_version">[docs]</a><span class="k">def</span> <span class="nf">print_version</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="n">version</span><span class="p">):</span>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Overview: module code — Git Lint 0.0.6 documentation</title>
|
||||
<title>Overview: module code — 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" />
|
||||
|
@ -14,7 +14,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: '../',
|
||||
VERSION: '0.0.6',
|
||||
VERSION: '0.0.7',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -23,7 +23,7 @@
|
|||
<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.6 documentation" href="../index.html" />
|
||||
<link rel="top" title="Git Lint 0.0.7 documentation" href="../index.html" />
|
||||
|
||||
<link rel="stylesheet" href="../static/custom.css" type="text/css" />
|
||||
|
||||
|
|
BIN
objects.inv
BIN
objects.inv
Binary file not shown.
|
@ -6,7 +6,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Python Module Index — Git Lint 0.0.6 documentation</title>
|
||||
<title>Python Module Index — 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" />
|
||||
|
@ -14,7 +14,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '0.0.6',
|
||||
VERSION: '0.0.7',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -23,7 +23,7 @@
|
|||
<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.6 documentation" href="index.html" />
|
||||
<link rel="top" title="Git Lint 0.0.7 documentation" href="index.html" />
|
||||
|
||||
|
||||
<link rel="stylesheet" href="static/custom.css" type="text/css" />
|
||||
|
|
16
readme.html
16
readme.html
|
@ -6,7 +6,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Git Lint: README — Git Lint 0.0.6 documentation</title>
|
||||
<title>Git Lint: README — 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" />
|
||||
|
@ -14,7 +14,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '0.0.6',
|
||||
VERSION: '0.0.7',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -23,7 +23,7 @@
|
|||
<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.6 documentation" href="index.html" />
|
||||
<link rel="top" title="Git Lint 0.0.7 documentation" href="index.html" />
|
||||
<link rel="next" title="Installation" href="installation.html" />
|
||||
<link rel="prev" title="Git Lint" href="index.html" />
|
||||
|
||||
|
@ -115,6 +115,15 @@ same, so as not to confuse your build system or IDE.</li>
|
|||
inspired by Steve Pulec’s <a class="reference external" href="https://dzone.com/articles/why-your-need-git-pre-commit">Why You Need a Git Pre-Commit Hook and Why Most Are Wrong</a>, as well as just my own needs
|
||||
as a software developer.</p>
|
||||
</div>
|
||||
<div class="section" id="to-do">
|
||||
<h2>To do<a class="headerlink" href="#to-do" title="Permalink to this headline">¶</a></h2>
|
||||
<ul class="simple">
|
||||
<li>The ‘-q’ and ‘–quiet’ arguments do not work.</li>
|
||||
<li>Ought to be able to silence the “no linter found” message.</li>
|
||||
<li>Ought to be able to configure ‘-q’ and ‘–silence’ commands in .git-lint/config file.</li>
|
||||
<li>Ought to be able to override config file for above.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="disclaimer">
|
||||
<h2>Disclaimer<a class="headerlink" href="#disclaimer" title="Permalink to this headline">¶</a></h2>
|
||||
<p>This software, including provided configuration and documentation
|
||||
|
@ -146,6 +155,7 @@ otherwise connected with the program is assumed by the user.</p>
|
|||
<li><a class="reference internal" href="#install">Install</a></li>
|
||||
<li><a class="reference internal" href="#features">Features</a></li>
|
||||
<li><a class="reference internal" href="#acknowledgements">Acknowledgements</a></li>
|
||||
<li><a class="reference internal" href="#to-do">To do</a></li>
|
||||
<li><a class="reference internal" href="#disclaimer">Disclaimer</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Search — Git Lint 0.0.6 documentation</title>
|
||||
<title>Search — 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" />
|
||||
|
@ -14,7 +14,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '0.0.6',
|
||||
VERSION: '0.0.7',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -24,7 +24,7 @@
|
|||
<script type="text/javascript" src="static/underscore.js"></script>
|
||||
<script type="text/javascript" src="static/doctools.js"></script>
|
||||
<script type="text/javascript" src="static/searchtools.js"></script>
|
||||
<link rel="top" title="Git Lint 0.0.6 documentation" href="index.html" />
|
||||
<link rel="top" title="Git Lint 0.0.7 documentation" href="index.html" />
|
||||
<script type="text/javascript">
|
||||
jQuery(function() { Search.loadIndex("searchindex.js"); });
|
||||
</script>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -6,7 +6,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Strategies — Git Lint 0.0.6 documentation</title>
|
||||
<title>Strategies — 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" />
|
||||
|
@ -14,7 +14,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '0.0.6',
|
||||
VERSION: '0.0.7',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -23,7 +23,7 @@
|
|||
<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.6 documentation" href="index.html" />
|
||||
<link rel="top" title="Git Lint 0.0.7 documentation" href="index.html" />
|
||||
|
||||
<link rel="stylesheet" href="static/custom.css" type="text/css" />
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
|
||||
<title>Usage — Git Lint 0.0.6 documentation</title>
|
||||
<title>Usage — 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" />
|
||||
|
@ -14,7 +14,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: './',
|
||||
VERSION: '0.0.6',
|
||||
VERSION: '0.0.7',
|
||||
COLLAPSE_INDEX: false,
|
||||
FILE_SUFFIX: '.html',
|
||||
HAS_SOURCE: true
|
||||
|
@ -23,7 +23,7 @@
|
|||
<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.6 documentation" href="index.html" />
|
||||
<link rel="top" title="Git Lint 0.0.7 documentation" href="index.html" />
|
||||
<link rel="next" title="Contributing" href="contributing.html" />
|
||||
<link rel="prev" title="Installation" href="installation.html" />
|
||||
|
||||
|
|
Loading…
Reference in New Issue