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: README — 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" />
|
|
|
|
|
<link rel="next" title="Installation" href="installation.html" />
|
|
|
|
|
<link rel="prev" title="Welcome to Git Lint’s 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>
|
|
|
|
|
<li class="right" >
|
|
|
|
|
<a href="installation.html" title="Installation"
|
|
|
|
|
accesskey="N">next</a> |</li>
|
|
|
|
|
<li class="right" >
|
|
|
|
|
<a href="index.html" title="Welcome to Git Lint’s documentation!"
|
|
|
|
|
accesskey="P">previous</a> |</li>
|
2016-10-04 00:31:52 +00:00
|
|
|
|
<li><a href="index.html">Git Lint 0.0.4 documentation</a> »</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-readme">
|
|
|
|
|
<h1>Git Lint: README<a class="headerlink" href="#git-lint-readme" title="Permalink to this headline">¶</a></h1>
|
|
|
|
|
<p>A git command that automatically runs identifiable linters against
|
|
|
|
|
changed files in your current git repository or staging area.</p>
|
|
|
|
|
<ul class="simple">
|
|
|
|
|
<li>Free software: MIT license</li>
|
|
|
|
|
</ul>
|
|
|
|
|
<p><strong>Git Lint</strong> runs a configurable set of syntax, style, and complexity
|
|
|
|
|
checkers against changed files in your current working directory or
|
|
|
|
|
staging area. It can be configured to work with any <cite>lint</cite>-like
|
|
|
|
|
command. Some commands may require shell wrappers.</p>
|
|
|
|
|
<p>While it may be possible to create a custom lint command in your npm,
|
|
|
|
|
grunt, Make, CMake, or whatever, the fact is we all use a VCS, and most
|
|
|
|
|
of us use git. Having a centralized repository for what we want checked
|
|
|
|
|
and how we want it checked, associated with git (and by extension, as a
|
|
|
|
|
pre-commit hook), that can be run at any time for any reason.</p>
|
|
|
|
|
<div class="section" id="usage">
|
|
|
|
|
<h2>Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h2>
|
|
|
|
|
<dl class="docutils">
|
|
|
|
|
<dt>To lint only what’s changed recently in your current working directory:</dt>
|
|
|
|
|
<dd><cite>git lint</cite></dd>
|
|
|
|
|
<dt>To lint everything, changed or otherwise, from the current directory down:</dt>
|
|
|
|
|
<dd><cite>git lint -a</cite></dd>
|
|
|
|
|
<dt>To lint what’s changed from the repo’s base:</dt>
|
|
|
|
|
<dd><cite>git lint -b</cite></dd>
|
|
|
|
|
<dt>To lint what’s in your staging directory:</dt>
|
|
|
|
|
<dd><cite>git lint -s</cite></dd>
|
|
|
|
|
</dl>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="section" id="install">
|
|
|
|
|
<h2>Install<a class="headerlink" href="#install" title="Permalink to this headline">¶</a></h2>
|
|
|
|
|
<blockquote>
|
|
|
|
|
<div><cite>pip install git-linter</cite></div></blockquote>
|
|
|
|
|
<p>You will need to copy the .git-lint configuration file to either your
|
|
|
|
|
home directory or the repo`s base directory. Edit the configuration
|
|
|
|
|
file as needed. You will also need any linters that you plan on
|
|
|
|
|
running.</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="section" id="features">
|
|
|
|
|
<h2>Features<a class="headerlink" href="#features" title="Permalink to this headline">¶</a></h2>
|
|
|
|
|
<ul class="simple">
|
|
|
|
|
<li>Highly configurable - configuration files, both for git-lint and
|
|
|
|
|
individual linters, can be global or per-project.</li>
|
|
|
|
|
<li>Only checks files that have been changed, but this can be overriden
|
|
|
|
|
from the command line.</li>
|
|
|
|
|
<li>Can be used directly as a pre-commit hook, to ensure you personally
|
|
|
|
|
don’t check in anything broken.<ul>
|
|
|
|
|
<li>Used this way, it checks the <em>staging</em> area, not your workspace.</li>
|
|
|
|
|
<li>When using the staging area, it stashes your current work. Upon
|
|
|
|
|
restoration of your workspace, it ensures the timestamps are the
|
|
|
|
|
same, so as not to confuse your build system or IDE.</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="section" id="acknowledgements">
|
|
|
|
|
<h2>Acknowledgements<a class="headerlink" href="#acknowledgements" title="Permalink to this headline">¶</a></h2>
|
|
|
|
|
<p><cite>Git lint</cite> started life as a simple pre-commit hook. Most of the
|
|
|
|
|
changes since were inspired by Steve Pulec’s <em>`Why You Need a Git
|
|
|
|
|
Pre-Commit Hook and Why Most Are Wrong`_ ,</em> as well as just my own needs as
|
|
|
|
|
a software developer.</p>
|
|
|
|
|
</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
|
|
|
|
|
materials, is provided “as is” without any warranties, including any
|
|
|
|
|
implied warranties of merchantability, fitness, performance, or
|
|
|
|
|
quality. In no event shall the author or sponsor be liable for any
|
|
|
|
|
special, direct, indirect, or consequential damages or any damages
|
|
|
|
|
whatsoever resulting from loss of use, data or profits, whether in an
|
|
|
|
|
action of contract, negligence or other tortious action, arising out
|
|
|
|
|
of or in connection with the use or performance of this software.
|
|
|
|
|
Each user of the program will agree and understand, and be deemed to
|
|
|
|
|
have agreed and understood, that there is no warranty whatsoever for
|
|
|
|
|
the program and, accordingly, the entire risk arising from or
|
|
|
|
|
otherwise connected with the program is assumed by the user.</p>
|
|
|
|
|
</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: README</a><ul>
|
|
|
|
|
<li><a class="reference internal" href="#usage">Usage</a></li>
|
|
|
|
|
<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="#disclaimer">Disclaimer</a></li>
|
|
|
|
|
</ul>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<h4>Previous topic</h4>
|
|
|
|
|
<p class="topless"><a href="index.html"
|
|
|
|
|
title="previous chapter">Welcome to Git Lint’s documentation!</a></p>
|
|
|
|
|
<h4>Next topic</h4>
|
|
|
|
|
<p class="topless"><a href="installation.html"
|
|
|
|
|
title="next chapter">Installation</a></p>
|
2016-10-04 00:31:52 +00:00
|
|
|
|
<h3>This Page</h3>
|
|
|
|
|
<ul class="this-page-menu">
|
|
|
|
|
<li><a href="sources/readme.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>
|
|
|
|
|
<li class="right" >
|
|
|
|
|
<a href="installation.html" title="Installation"
|
|
|
|
|
>next</a> |</li>
|
|
|
|
|
<li class="right" >
|
|
|
|
|
<a href="index.html" title="Welcome to Git Lint’s documentation!"
|
|
|
|
|
>previous</a> |</li>
|
2016-10-04 00:31:52 +00:00
|
|
|
|
<li><a href="index.html">Git Lint 0.0.4 documentation</a> »</li>
|
2016-10-03 20:28:07 +00:00
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
2016-10-04 00:31:52 +00:00
|
|
|
|
<div class="footer">
|
|
|
|
|
© Copyright 2016, Kenneth M. "Elf" 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>
|