diff options
Diffstat (limited to '')
-rw-r--r-- | docs/index.md | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/docs/index.md b/docs/index.md index 801a16e..b735b6b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -7,7 +7,7 @@ Great for use as a [commit-msg git hook](#using-gitlint-as-a-commit-msg-hook) or <script type="text/javascript" src="https://asciinema.org/a/30477.js" id="asciicast-30477" async></script> !!! note - **Gitlint support for Windows is experimental**, and [there are some known issues](https://github.com/jorisroovers/gitlint/issues?q=is%3Aissue+is%3Aopen+label%3Awindows). + **Gitlint works on Windows**, but [there are some known issues](https://github.com/jorisroovers/gitlint/issues?q=is%3Aissue+is%3Aopen+label%3Awindows). Also, gitlint is not the only git commit message linter out there, if you are looking for an alternative written in a different language, have a look at [fit-commit](https://github.com/m1foley/fit-commit) (Ruby), @@ -15,7 +15,7 @@ Great for use as a [commit-msg git hook](#using-gitlint-as-a-commit-msg-hook) or !!! important - **Gitlint no longer supports Python 2.7 and Python 3.5 as they [have reached End-Of-Life](https://endoflife.date/python). The last gitlint version to support Python 2.7 and Python 3.5 is `0.14.0` (released on October 24th, 2020).** + **Gitlint requires Python 3.7 (or above). For Python 2.7 and Python 3.5 use `gitlint==0.14.0` (released 2020-10-24), for Python 3.6 `gitlint==0.18.0` (released 2022-11-16).** ## Features - **Commit message hook**: [Auto-trigger validations against new commit message right when you're committing](#using-gitlint-as-a-commit-msg-hook). Also [works with pre-commit](#using-gitlint-through-pre-commit). @@ -30,7 +30,8 @@ useful throughout the years. - **User-defined rules:** Want to do more then what gitlint offers out of the box? Write your own [user defined rules](user_defined_rules.md). - **Full unicode support:** Lint your Russian, Chinese or Emoji commit messages with ease! - **Production-ready:** Gitlint checks a lot of the boxes you're looking for: actively maintained, high unit test coverage, integration tests, - python code standards (pep8, pylint), good documentation, widely used, proven track record. + python code standards ([black](https://github.com/psf/black), [ruff](https://github.com/charliermarsh/ruff)), + good documentation, widely used, proven track record. ## Getting Started ### Installation @@ -271,7 +272,7 @@ If you want to lint more commits you can modify the `gitlint-ci` hook like so: ```yaml - repo: https://github.com/jorisroovers/gitlint - rev: v0.17.0 + rev: # insert ref, e.g. v0.18.0 hooks: - id: gitlint - id: gitlint-ci @@ -317,12 +318,14 @@ gitlint --commits mybranch # Lint all commits that are different between a branch and your main branch gitlint --commits "main..mybranch" # Use git's special references -gitlint --commits "origin..HEAD" +gitlint --commits "origin/main..HEAD" # You can also pass multiple, comma separated commit hashes: gitlint --commits 019cf40,c50eb150,d6bc75a # These can include special references as well gitlint --commits HEAD~1,mybranch-name,origin/main,d6bc75a +# You can also lint a single commit with --commits: +gitling --commits 019cf40, ``` The `--commits` flag takes a **single** refspec argument or commit range. Basically, any range that is understood @@ -331,6 +334,7 @@ by [git rev-list](https://git-scm.com/docs/git-rev-list) as a single argument wi Alternatively, you can pass `--commits` a comma-separated list of commit hashes (both short and full-length SHAs work, as well as special references such as `HEAD` and branch names). Gitlint will treat these as pointers to **single** commits and lint these in the order you passed. +`--commits` also accepts a single commit SHA with a trailing comma. For cases where the `--commits` option doesn't provide the flexibility you need, you can always use a simple shell script to lint an arbitrary set of commits, like shown in the example below. |