Fix pre-commit and tox and gitlint settings 10/96410/1
authorGuillaume Lambert <guillaume.lambert@orange.com>
Wed, 2 Jun 2021 19:03:10 +0000 (21:03 +0200)
committerGuillaume Lambert <guillaume.lambert@orange.com>
Wed, 2 Jun 2021 19:31:12 +0000 (21:31 +0200)
commit18f25b40e64bc60341d4036f09db14401fe9aaf6
treed5de37c074d401e7f0043162556f9a46462fc34a
parent8d1bac9b58b814359a3e21415220269468485718
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
.gitlint [new file with mode: 0644]
.pre-commit-config.yaml
tox.ini