git-linter/manual.html

188 lines
8.3 KiB
HTML
Raw Normal View History

2016-10-03 20:28:07 +00:00
<!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" />
2016-10-04 00:31:52 +00:00
<title>git-lint(1) &mdash; Git Lint 0.0.4 documentation</title>
2016-10-03 20:28:07 +00:00
2016-10-04 00:31:52 +00:00
<link rel="stylesheet" href="static/default.css" type="text/css" />
2016-10-03 20:31:59 +00:00
<link rel="stylesheet" href="static/pygments.css" type="text/css" />
2016-10-03 20:28:07 +00:00
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.0.4',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
2016-10-03 20:31:59 +00:00
<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>
2016-10-03 20:28:07 +00:00
<link rel="top" title="Git Lint 0.0.4 documentation" href="index.html" />
</head>
2016-10-04 00:31:52 +00:00
<body>
<div class="related">
2016-10-03 20:28:07 +00:00
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
2016-10-04 00:31:52 +00:00
<li><a href="index.html">Git Lint 0.0.4 documentation</a> &raquo;</li>
2016-10-03 20:28:07 +00:00
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
2016-10-04 00:31:52 +00:00
<div class="body">
2016-10-03 20:28:07 +00:00
<div class="section" id="git-lint-1">
<h1>git-lint(1)<a class="headerlink" href="#git-lint-1" title="Permalink to this headline"></a></h1>
<div class="section" id="name">
<h2>NAME<a class="headerlink" href="#name" title="Permalink to this headline"></a></h2>
<p>git-lint - Run configured linters against changed files</p>
</div>
<div class="section" id="synopsis">
<h2>SYNOPSIS<a class="headerlink" href="#synopsis" title="Permalink to this headline"></a></h2>
<p>[verse]
2016-10-04 00:31:52 +00:00
<tt class="docutils literal"><span class="pre">git</span> <span class="pre">lint</span></tt> [&lt;options&gt;...] [&lt;files...&gt;]</p>
2016-10-03 20:28:07 +00:00
</div>
<div class="section" id="description">
<h2>DESCRIPTION<a class="headerlink" href="#description" title="Permalink to this headline"></a></h2>
<p>Runs a list of configured linters against a specified list of files in
your repository. By default all linters will be run against the
changed files in your current workspace, from the current working
directory on down. Command line options let you choose a different
directory, a different of files, the complete set of files, and even
the files currently in the staging area.</p>
</div>
<div class="section" id="options">
<h2>OPTIONS<a class="headerlink" href="#options" title="Permalink to this headline"></a></h2>
<dl class="docutils">
<dt><strong>-o &lt;linters&gt;, &#8211;only=&lt;linters&gt;</strong></dt>
<dd>A comma-separated list of only those linters to run.</dd>
<dt><strong>-x &lt;linters&gt; &#8211;exclude=&lt;linters&gt;</strong></dt>
<dd>A comma-separated list of linters to skip.</dd>
<dt><strong>-l, &#8211;linters</strong></dt>
<dd>Show the list of configured linters.</dd>
<dt><strong>-b, &#8211;base</strong></dt>
<dd>Check all changed files from GIT_DIR, not just those in the current directory and down.</dd>
<dt><strong>-a, &#8211;all</strong></dt>
<dd>Scan all files, not just those that have changed.</dd>
<dt><strong>-e, &#8211;every</strong></dt>
<dd>Scan all files, not just those that have changed, from GIT_DIR. Short for -b -a</dd>
<dt><strong>-w, &#8211;workspace</strong></dt>
<dd>Scan the workspace [default]</dd>
<dt><strong>-s, &#8211;staging</strong></dt>
<dd>Scan the staging area (useful for pre-commit).</dd>
<dt><strong>-c &lt;path&gt;, &#8211;config=&lt;path&gt;</strong></dt>
<dd>Path to config file</dd>
<dt><strong>-t, &#8211;bylinter</strong></dt>
<dd>Group reports by linter first as they appear in the config file [default]</dd>
<dt><strong>-f, &#8211;byfile</strong></dt>
<dd>Group reports by file first, linter second</dd>
<dt><strong>-d, &#8211;dryrun</strong></dt>
<dd>Report what git-lint would do, but don&#8217;t actually do anything.</dd>
<dt><strong>-q, &#8211;quiet</strong></dt>
<dd>Produce a short report of file that failed to pass.</dd>
<dt><strong>-h, &#8211;help</strong></dt>
<dd>Print a short help message</dd>
<dt><strong>-V, &#8211;verbose</strong></dt>
<dd>Print a slightly more verbose long report</dd>
<dt><strong>-v, &#8211;version</strong></dt>
<dd>Print version information</dd>
</dl>
</div>
<div class="section" id="output">
<h2>OUTPUT<a class="headerlink" href="#output" title="Permalink to this headline"></a></h2>
<p>By default, the output is that of all the linters specified, in the
order in which they appear in the configuration file, followed by
every file specified, sorted ASCIIbetically. This order can be
2016-10-04 00:31:52 +00:00
flipped (files first, then linters) with the <tt class="docutils literal"><span class="pre">--byfiles</span></tt> option.</p>
<p><tt class="docutils literal"><span class="pre">git</span> <span class="pre">lint</span></tt> returns the maximal error code if any linters fail a
2016-10-03 20:28:07 +00:00
pass, or zero if they all succeed.</p>
</div>
<div class="section" id="configuration">
<h2>CONFIGURATION<a class="headerlink" href="#configuration" title="Permalink to this headline"></a></h2>
2016-10-04 00:31:52 +00:00
<p><tt class="docutils literal"><span class="pre">git</span> <span class="pre">lint</span></tt> uses a standard INI-style configuration file. Aside from the
2016-10-03 20:28:07 +00:00
DEFAULT section, the name of each section is an alphanumeric token name for
a linter, followed by configuration details for that linter. Standard details
are:</p>
<ul class="simple">
<li>output - Text to print before running a linter.</li>
<li>command - The actual command to run, minus the file path</li>
<li>match - A comma-separated list of extensions to match against the linter</li>
<li>print - If true, will prefix each line of output from the linter with the filename</li>
<li>condition - if &#8220;error&#8221;, the return code of the linter is the status of the pass. If &#8220;output,&#8221; any output will result in a failure.</li>
2016-10-04 00:31:52 +00:00
<li>comment - Text to include when running the <tt class="docutils literal"><span class="pre">--linters</span></tt> option</li>
2016-10-03 20:28:07 +00:00
</ul>
</div>
</div>
</div>
</div>
</div>
2016-10-04 00:31:52 +00:00
<div class="sphinxsidebar">
2016-10-03 20:28:07 +00:00
<div class="sphinxsidebarwrapper">
<h3><a href="index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">git-lint(1)</a><ul>
<li><a class="reference internal" href="#name">NAME</a></li>
<li><a class="reference internal" href="#synopsis">SYNOPSIS</a></li>
<li><a class="reference internal" href="#description">DESCRIPTION</a></li>
<li><a class="reference internal" href="#options">OPTIONS</a></li>
<li><a class="reference internal" href="#output">OUTPUT</a></li>
<li><a class="reference internal" href="#configuration">CONFIGURATION</a></li>
</ul>
</li>
</ul>
2016-10-04 00:31:52 +00:00
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="sources/manual.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
2016-10-03 20:28:07 +00:00
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
2016-10-04 00:31:52 +00:00
<input type="text" name="q" />
<input type="submit" value="Go" />
2016-10-03 20:28:07 +00:00
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
2016-10-04 00:31:52 +00:00
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
2016-10-03 20:28:07 +00:00
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
2016-10-04 00:31:52 +00:00
<div class="related">
2016-10-03 20:28:07 +00:00
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
2016-10-04 00:31:52 +00:00
<li><a href="index.html">Git Lint 0.0.4 documentation</a> &raquo;</li>
2016-10-03 20:28:07 +00:00
</ul>
</div>
2016-10-04 00:31:52 +00:00
<div class="footer">
&copy; Copyright 2016, Kenneth M. &#34;Elf&#34; Sternberg.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.2.
2016-10-03 20:28:07 +00:00
</div>
</body>
</html>