A pre-commit hook that knows how to diff against files in the staging area, not the file system.
Go to file
Elf M. Sternberg 2f450c0170 Cleanup and re-issue. 2016-10-04 10:20:46 -07:00
modules That's SO much better. 2016-10-03 17:31:52 -07:00
sources Cleanup and re-issue. 2016-10-04 10:20:46 -07:00
static That's SO much better. 2016-10-03 17:31:52 -07:00
.editorconfig Used cookiecutter to generate a better skeleton for the project, prior 2016-09-19 14:41:01 -07:00
.git-lint Updating the requirements doc. 2016-10-03 12:44:57 -07:00
.gitignore That's SO much better. 2016-10-03 17:31:52 -07:00
.travis.yml Used cookiecutter to generate a better skeleton for the project, prior 2016-09-19 14:41:01 -07:00
LICENSE Used cookiecutter to generate a better skeleton for the project, prior 2016-09-19 14:41:01 -07:00
Makefile Cleanup and re-issue. 2016-10-04 10:20:46 -07:00
arguments.html That's SO much better. 2016-10-03 17:31:52 -07:00
authors.html That's SO much better. 2016-10-03 17:31:52 -07:00
contributing.html That's SO much better. 2016-10-03 17:31:52 -07:00
genindex.html That's SO much better. 2016-10-03 17:31:52 -07:00
git_lint.html That's SO much better. 2016-10-03 17:31:52 -07:00
history.html That's SO much better. 2016-10-03 17:31:52 -07:00
index.html That's SO much better. 2016-10-03 17:31:52 -07:00
installation.html That's SO much better. 2016-10-03 17:31:52 -07:00
manual.html That's SO much better. 2016-10-03 17:31:52 -07:00
modules.html That's SO much better. 2016-10-03 17:31:52 -07:00
objects.inv That's SO much better. 2016-10-03 17:31:52 -07:00
py-modindex.html That's SO much better. 2016-10-03 17:31:52 -07:00
readme.html That's SO much better. 2016-10-03 17:31:52 -07:00
search.html That's SO much better. 2016-10-03 17:31:52 -07:00
searchindex.js Cleanup and re-issue. 2016-10-04 10:20:46 -07:00
strategies.html That's SO much better. 2016-10-03 17:31:52 -07:00
usage.html Cleanup and re-issue. 2016-10-04 10:20:46 -07:00

readme.html

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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: README &mdash; Git Lint 0.0.4 documentation</title>
    
    <link rel="stylesheet" href="static/default.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.4',
        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.4 documentation" href="index.html" />
    <link rel="next" title="Installation" href="installation.html" />
    <link rel="prev" title="Welcome to Git Lints documentation!" href="index.html" /> 
  </head>
  <body>
    <div class="related">
      <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 Lints documentation!"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">Git Lint 0.0.4 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <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&#8217;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&#8217;s changed from the repo&#8217;s base:</dt>
<dd><cite>git lint -b</cite></dd>
<dt>To lint what&#8217;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&#8217;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&#8217;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 &#8220;as is&#8221; 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>
      <div class="sphinxsidebar">
        <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&#8217;s documentation!</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="installation.html"
                        title="next chapter">Installation</a></p>
  <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">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <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 Lints documentation!"
             >previous</a> |</li>
        <li><a href="index.html">Git Lint 0.0.4 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <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.
    </div>
  </body>
</html>