Linting for your git commit messages
Full Changelog: https://github.com/jorisroovers/gitlint/compare/v0.19.0...v0.19.1
This release was primarily focused on modernizing gitlint's build and test tooling (details: #378).
GITLINT_USE_SH_LIB=1
. This is already disabled by default since v0.18.0.--commits
cmd-line param (#412) - thanks @carlescufiFILE_ENCODING
(always UTF-8) from TERMINAL_ENCODING
(terminal dependent), this should improve issues with unicode. Use gitlint --debug
to inspect these values. (#424)ignore-by-author-name
crashes without --staged (#445)latest_dev
docker image on every commit to main (#451) (#452)Full Changelog: https://github.com/jorisroovers/gitlint/compare/v0.18.0...v0.19.0
Release Candidate 2 for the upcoming 0.19.0 release
Release Candidate 1 for the upcoming 0.19.0 release
Contributors: Special thanks to all contributors for this release - details inline!
re.search
instead of re.match
semantics for all rules. Your rule regexes might need updating as a result, gitlint will print a warning if so. More details are in the docs. (#254)sh
can be re-enabled by setting the env var GITLINT_USE_SH_LIB=1
. This fallback will be removed entirely in a future gitlint release. (#351)--commits
now also accepts a comma-separated list of commit hashes, making it possible to lint a list of non-contiguous commits without invoking gitlint multiple times (#283)GITLINT_CONFIG
env variable (#189) - thanks Notgnoshi
gitlint-ci
pre-commit hook, making it easier to run gitlint through pre-commit in CI (#191) - thanks guillaumelambert
fixup=amend
commits (see related git documentation), available as commit.is_fixup_amend_commit=True
commit.changed_files_stats
(#314)master
branch in favor of main
Contributors: Special thanks to all contributors for this release, in particular andersk and sigmavirus24.
gitlint
and gitlint-core
. This allows users to install gitlint without pinned dependencies (which is the default) (#162)Contributors: Special thanks to all contributors for this release, in particular sigmavirus24, l0b0 and rafaelbubach.
--commit <SHA>
flag to more easily lint a single commit message (#141)--fail-without-commits
flag will force gitlint to fail (exit code 253) when the target commit range is empty (typically when using --commits
) (#193)Contributors: Special thanks to all contributors for this release, in particular PW999, gsemet and Lorac.
Bugfixes:
body-is-missing
(#176)git commit -s
for contrib-requires-signed-off-by
rule (#178)Click==7.1.2
, arrow==1.0.3
, sh==1.14.1
).Contributors: Special thanks to BrunIF, lukech, Cielquan, harens and sigmavirus24.
This release drops support for Python 2.7 and Python 3.5 (both are EOL). Other than a few minor fixes, there are no functional differences from the 0.14.0 release.
Other call-outs:
Click==7.1.2
, arrow==0.17.0
, sh==1.14.1
).Contributors: Special thanks to all contributors for this release, in particular @mrshu, @glasserc, @strk, @chgl, @melg8 and @sigmavirus24.
commit-msg
hook has been re-written in Python (it contained a lot of Bash before), fixing a number of platform specific issues. Existing users will need to reinstall their hooks (gitlint uninstall-hook; gitlint install-hook
) to make use of this.general.ignore
option via GITLINT_IGNORE=T1,T2
). The list of available environment variables can be found in the configuration documentation.self.log.debug("my message")
for debugging purposes in their user-defined rules. Debug messages will show up when running gitlint --debug
.RegexOption
rule option type for use in user-defined rules. By using the RegexOption
, regular expressions are pre-validated at gitlint startup and compiled only once which is much more efficient when linting multiple commits.commit-msg
hook (#94)--ulimit nofile=1024
when invoking gitlint using Docker (#129)commit-msg
hook was broken in Ubuntu's gitlint package due to a python/python3 mismatch (#127)None
(from code) to make them optional."None"
as default regex, but an empty regex - effectively disabling them by default (as intended).