209 lines
9.0 KiB
HTML
209 lines
9.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: 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" />
|
|
|
|
<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="next" title="Installation" href="installation.html" />
|
|
<link rel="prev" title="Git Lint" 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-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="documentation">
|
|
<h2>Documentation<a class="headerlink" href="#documentation" title="Permalink to this headline">¶</a></h2>
|
|
<p>Complete documentation for the project is available in the docs directory, or at <a class="reference external" href="https://elfsternberg.github.io/git-linter/index.html">Git
|
|
Linter Docs</a>.</p>
|
|
</div>
|
|
<div class="section" id="install">
|
|
<h2>Install<a class="headerlink" href="#install" title="Permalink to this headline">¶</a></h2>
|
|
<p>This <em>ought</em> to work:</p>
|
|
<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>
|
|
<p>As git-linter is still mostly alpha code, it might be better to install
|
|
from source:</p>
|
|
<blockquote>
|
|
<div>``
|
|
git clone <a class="reference external" href="https://github.com/elfsternberg/git-linter">https://github.com/elfsternberg/git-linter</a>
|
|
python setup.py install
|
|
``</div></blockquote>
|
|
</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 <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
|
|
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>
|
|
<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: README</a><ul>
|
|
<li><a class="reference internal" href="#usage">Usage</a></li>
|
|
<li><a class="reference internal" href="#documentation">Documentation</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="#to-do">To do</a></li>
|
|
<li><a class="reference internal" href="#disclaimer">Disclaimer</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="relations">
|
|
<h3>Related Topics</h3>
|
|
<ul>
|
|
<li><a href="index.html">Documentation overview</a><ul>
|
|
<li>Previous: <a href="index.html" title="previous chapter">Git Lint</a></li>
|
|
<li>Next: <a href="installation.html" title="next chapter">Installation</a></li>
|
|
</ul></li>
|
|
</ul>
|
|
</div>
|
|
<div role="note" aria-label="source link">
|
|
<h3>This Page</h3>
|
|
<ul class="this-page-menu">
|
|
<li><a href="sources/readme.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">
|
|
©2016, Kenneth M. "Elf" Sternberg.
|
|
|
|
|
|
|
Powered by <a href="http://sphinx-doc.org/">Sphinx 1.4.6</a>
|
|
& <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.9</a>
|
|
|
|
|
|
|
<a href="sources/readme.txt"
|
|
rel="nofollow">Page source</a>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</body>
|
|
</html> |