git-linter/manual.html

187 lines
8.0 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(1) &#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-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]
<code class="docutils literal"><span class="pre">git</span> <span class="pre">lint</span></code> [&lt;options&gt;...] [&lt;files...&gt;]</p>
</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
flipped (files first, then linters) with the <code class="docutils literal"><span class="pre">--byfiles</span></code> option.</p>
<p><code class="docutils literal"><span class="pre">git</span> <span class="pre">lint</span></code> returns the maximal error code if any linters fail a
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>
<p><code class="docutils literal"><span class="pre">git</span> <span class="pre">lint</span></code> uses a standard INI-style configuration file. Aside from the
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>
<li>comment - Text to include when running the <code class="docutils literal"><span class="pre">--linters</span></code> option</li>
</ul>
</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(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>
<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/manual.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/manual.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>