Commit Graph

13 Commits

Author SHA1 Message Date
Carles Cufi 1b8f5e3f79 gitlint: Stop ignoring merge, revert, fixup and squash commits
Some special commit types were being ignored by Gitlint, allowing
commits that did not abide by our formatting rules to slip through the
checks. Instead, enforce them on all commit types.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2022-01-10 08:13:36 -05:00
Ederson de Souza 551b12b4a3 gitlint: Make commit message line size be compatible with checkpatch.pl
checkpatch.pl recommends that commit messages line size should not go over
75 characters, howerver .gitlint was enforcing 72 characters instead, which
is inconsistent. This patch changes .gitlint so that both are compatible.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2021-12-01 09:37:11 +01:00
Anas Nashif 3085ce074d gitlint: match max title length restriction with checkpatch
Match the restriction on title length with checkpatch, since we document
that we follow the Linux style and checkpatch was there before gitlint.

Fixes #14652

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-05-29 14:43:16 -04:00
Anas Nashif 8d84f9229c gitlint: do not start with subsys:
Commit messages should not start with literal "subsys:", instead, spell
out the actual subsystem name.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-11-28 09:22:01 -08:00
Anas Nashif 9c6a1aa792 gitlint: use custom rule for line length violations
Custom rule has some exceptions for long urls and long names/email
addressed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-02-07 15:28:36 -05:00
Anas Nashif 2dd5cef811 gitlint: do not allow title-only commit messages
It has been agreed in the project TSC to reject commit messages without
any content. Every commit message needs some explaination beyond what
was put in the title, even the most trivial ones.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2018-01-11 06:39:42 -05:00
Anas Nashif ad405a08c2 gitlint: do not complain about hard tabs in body
Was enabled by default in gitlint, nothing really bad about tabs,
especially when copy-pasting into commit messages.

Fixes #5453

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-12-23 07:53:14 -05:00
David B. Kinder 2541f8788e scripts: allow "title" in commit titles
gitlint was complaining about use of the word "title"
in PR #1512 doc: fix link title in linux installation guide

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-09-15 16:36:49 -04:00
Anas Nashif 87766a25c6 gitlint: ignore titles prefixed with Revert
The revert commit title is usually prefixed with "Revert" which causes
the title to become longer than the allowed limit. Allow such commits to
keep revert commits consistent with the original commit message.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-08-08 09:04:25 -04:00
Kumar Gala e9ec91b7f2 ci: compliance: increase verbosity on gitlint
When we fail its nice to have more details in the CI logs about what
happened.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-07-13 13:04:49 -05:00
Anas Nashif b520075788 gitlint: Ignore signed-off-by line
When checking for line length limits, ignore lines with Signed-off-by.
Some developers have a long name that would not fit within the limits.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-06-06 09:35:50 -04:00
Anas Nashif 3c27c46562 gitlint: check for subsystem in commit subject
Check that we have <subsystem>: <subject> in commit messages.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-05-19 20:04:08 -04:00
Anas Nashif a35378e494 scripts: add gitlint to check for validity of commit messages
Install gitlint using pip:

 # pip install gitlint
 # gitlint install-hook

This will install the pre-commit hook.

Policies are define in .gitlint. Custom rules are available under
scripts/gitlint.

This script will also run in CI, so avoid CI errors by using the hook
above.

Change-Id: I62750a1fd9369341db29c413a6c4a1677bb0db8a
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-25 22:48:24 +00:00