Fix pre-commit and tox and gitlint settings 20/96320/2
authorGuillaume Lambert <guillaume.lambert@orange.com>
Wed, 2 Jun 2021 19:03:10 +0000 (21:03 +0200)
committerGuillaume Lambert <guillaume.lambert@orange.com>
Sat, 5 Jun 2021 19:44:41 +0000 (19:44 +0000)
commit2458b8f5392221f96514298e3b2cda142c2149d7
treef3ea77172b4def49d38b3ba5b2f3d96cc1cd8648
parentb3c8e3f380e82b64a43ee12f85b5dce08f1bcaa4
Fix pre-commit and tox and gitlint settings

- create a .gitlint configuration to enforce subject line < 50 char
  and body lines < 72 char and a Signed-off-by field presence.
- (auto)update repository revisions in pre-commit configuration file
- fix pre-commit tox profile to make it work locally
- create a gitlint profile that works in CI
- create pre-commit-install and pre-commit-uninstall tox profiles to
  (un)install hooks locally and (un)perform tests at each "git commit"
  call (i.e. without calling manually the pre-commit tox profile)
- precise pre-commit stages/types in the pre-commit configuration file
  so that hooks are installed correctly. This avoids messages about
  skipped tests when they are run at a wrong stage.

Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com>
Change-Id: I75b3b54b13e3d865ad6f563630bb0034456e7fe1
(cherry picked from commit 18f25b40e64bc60341d4036f09db14401fe9aaf6)
.gitlint [new file with mode: 0644]
.pre-commit-config.yaml
tox.ini