From 3461709ebfae81ce974a1075d114b4b19d80b47c Mon Sep 17 00:00:00 2001 From: "Kenneth M. Elf Sternberg" Date: Wed, 5 Oct 2016 13:11:49 -0700 Subject: [PATCH] Updating docs. --- MANIFEST.in | 1 + docs/index.rst | 8 ++++++-- docs/usage.rst | 20 ++++---------------- 3 files changed, 11 insertions(+), 18 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index 240c03f..3174acd 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -10,3 +10,4 @@ recursive-exclude * *.py[co] recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif *.1 include docs/_build/man/git-lint.1 +include bin/pre-commit bin/git-lint-style diff --git a/docs/index.rst b/docs/index.rst index 6375eae..44135d7 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -3,8 +3,12 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -Welcome to Git Lint's documentation! -====================================== +Git Lint +======== + +Git Lint provides a new git command that automatically runs identifiable linters (style +and syntax quality assurance programs) against changed files in your current git +repository or staging area. Contents: diff --git a/docs/usage.rst b/docs/usage.rst index 6c09e7a..a1bb28b 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -17,20 +17,8 @@ Options As a pre-commit hook: --------------------- -.. code-block:: python +There's a file, pre-commit, in the /bin directory with the project. (Or you can download +it from the github repository.) Install it in you .git/hooks/pre-commit file, and +chmod +x .git/hooks/pre-commit. - #!/usr/bin/env python - import git_lint - git_lint.run_precommit(staging = True, timestamps = True) - -Install this file in your project's ``.git/hooks/pre-commit``, and set -the file's executable flag to ``true``: - -.. code-block:: shell - - chmod +x pre-commit - -Please see the :ref:`api` for more details on options taken by the -``run_precommit()`` and ``run_gitlint`` commands. - -There is an example ``pre-commit`` script shipped with ``git lint``. +The pre-commit hook is *experimental*. Please be careful with it.