- update pre-commit repo revision
- use new gitlint-ci pre-commit profile
https://github.com/jorisroovers/gitlint/pull/192
- update pre-commit configuration accordingly
especially remove gitlint profile from envlist
since it is now supersed by gitlint-ci pre-commit profile
Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: I0984526059a4f869099c32f22909618fd294c549
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v4.0.1
+ rev: v4.3.0
hooks:
- id: trailing-whitespace
exclude: '^ordmodels/'
# ordmodels trailing blanks shall preferably be fixed in OpenROADM upstream repo
- repo: https://github.com/jorisroovers/gitlint
- rev: v0.16.0
+ rev: v0.18.0
hooks:
- id: gitlint
stages: [commit-msg]
+ - id: gitlint-ci
+ stages: [manual]
- repo: https://github.com/Lucas-C/pre-commit-hooks
- rev: v1.1.10
+ rev: v1.3.1
hooks:
- id: remove-tabs
stages: [commit]
exclude: '^(.git/|docs/make.bat|docs/Makefile|ordmodels/)'
- repo: https://github.com/pre-commit/mirrors-autopep8
- rev: v1.5.7
+ rev: v2.0.0
hooks:
- id: autopep8
args: ['--in-place', '--max-line-length=120']
docs-linkcheck
checkbashisms
pre-commit
- gitlint
pylint
skipsdist = true
setupdir = tests/
passenv = HOME
commands =
pre-commit run --all-files --show-diff-on-failure
- pre-commit run gitlint --hook-stage commit-msg --commit-msg-filename .git/COMMIT_EDITMSG
- # Gitlint only proposes a pre-commit configuration for the commit-msg stage but none for the commit stage.
- # Its default arguments --passed and --msg-filename are different from CI recommandations.
- # As a result, the line above is always skipped in jenkins CI since there cannot be a .git/COMMIT_EDITMSG file.
- # A dedicated gitlint profile for CI is proposed below. Also to behave fine locally, this profile must have access
- # to the HOME variable so that Gitlint can retrieve Git user settings.
+ pre-commit run gitlint-ci --hook-stage manual
[testenv:gitlint]
basepython = python3