Idea here is to replace the slow coala checker with the
much faster pre-commit hooks in the future as we replace
the different linters we're using via coala with pre-commit
versions.
Using this requires the developer to setup pre-commit on their
local dev environment to initialize this the first time the
contribute to this repo.
Install can be performed via one of the following methods:
1) Install pre-commit from your local package manager then run:
pre-commit install --hook-type commit-msg
2) Run `tox -e check-hooks`
Change-Id: I5b5d3dcbd7d83e90322f63ba99fa1f76c88ee8ad
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
bears = WriteGoodLintBear
files = docs/**.rst
-[all.Git]
-bears = GitCommitBear
-ignore_length_regex = Signed-off-by,
- Also-by,
- Co-authored-by,
- http://,
- https://
-
[all.Python]
bears = BanditBear,
PEP8Bear,
rev: v1.3.0
hooks:
- id: trailing-whitespace
+
+ - repo: https://github.com/jorisroovers/gitlint
+ rev: v0.11.0
+ hooks:
+ - id: gitlint
+
commands =
pytest --basetemp={envtmpdir} {posargs}
-[testenv:check-hooks]
-deps = pre-commit
-commands =
- pre-commit install
- pre-commit run --all-files
-
[testenv:coala]
basepython = python3
deps =
commands =
sphinx-build -j auto --keep-going -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
+[testenv:pre-commit]
+deps = pre-commit
+commands =
+ pre-commit install --hook-type commit-msg
+ pre-commit run --all-files
[testenv:reno]
deps = -rdocs/requirements.txt