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 739075d2df Experimental and not yet reliable. 2016-09-30 11:15:10 -07:00
bin Adding a check for readability. 2016-09-29 18:36:27 -07:00
docs Trying to restructure this to be more sensible. 2016-09-28 10:01:02 -07:00
git_lint Experimental and not yet reliable. 2016-09-30 11:15:10 -07:00
tests Python 3 compatibility tests passing. 2016-09-29 16:02:55 -07:00
utils Trying to get the man page just right. 2016-09-27 10:06:01 -07:00
.editorconfig Used cookiecutter to generate a better skeleton for the project, prior 2016-09-19 14:41:01 -07:00
.git-lint Much better! Almost have the output exactly the way I want it, and 2016-09-24 15:42:58 -07:00
.gitignore More development progress. 2016-09-19 15:36:58 -07:00
.travis.yml Used cookiecutter to generate a better skeleton for the project, prior 2016-09-19 14:41:01 -07:00
AUTHORS.rst Used cookiecutter to generate a better skeleton for the project, prior 2016-09-19 14:41:01 -07:00
CONTRIBUTING.rst Used cookiecutter to generate a better skeleton for the project, prior 2016-09-19 14:41:01 -07:00
HISTORY.rst The staging wrapper works beautifully. 2016-09-26 15:26:04 -07:00
LICENSE Used cookiecutter to generate a better skeleton for the project, prior 2016-09-19 14:41:01 -07:00
MANIFEST.in Used cookiecutter to generate a better skeleton for the project, prior 2016-09-19 14:41:01 -07:00
Makefile More development progress. 2016-09-19 15:36:58 -07:00
README.rst Adding a check for readability. 2016-09-29 18:36:27 -07:00
requirements_dev.txt Used cookiecutter to generate a better skeleton for the project, prior 2016-09-19 14:41:01 -07:00
setup.cfg Bumping version. 2016-09-26 16:54:27 -07:00
setup.py It's all coming together. 2016-09-28 14:26:06 -07:00
tox.ini W00t! Working unit tests to assert things, like "That kind works" 2016-09-29 15:14:46 -07:00

README.rst

===============================
Git Lint
===============================

A git command that automatically runs identifiable linters against
changed files in current repository or staging.

* Free software: MIT license

**Git Lint** 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 `lint` command.
Some commands may require shell wrappers.

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.

Features
--------

* Highly configurable - configuration files, both for git-lint and
  individual linters, can be global or per-project.

* Only checks files that have been changed, but this can be overriden
  from the command line.

* Can be used directly as a pre-commit hook, to ensure you personally
  don't check in anything broken.

  * Used this way, it checks the *staging* area, not your workspace.

  * 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.

Credits
-------

The completion of this project was graciously sponsored by my employer,
Splunk <http://splunk.com>.

Disclaimer
----------

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.