+++ /dev/null
-[Default]
-use_spaces = True
-enforce_newline_at_EOF = False
-default_actions = SpaceConsistencyBear: ApplyPatchAction
-
-[Git]
-bears = GitCommitBear
-ignore_length_regex = Signed-off-by,
- Also-by,
- Co-authored-by,
- http://,
- https://
-
-[Markdown]
-bears = MarkdownBear,SpaceConsistencyBear
-files = **.md
-ignore = .**,
- docs/submodules/**
-max_line_length = 120
-
-[reStructuredText]
-bears = SpaceConsistencyBear
-files = **.rst
-ignore = .**,
- docs/developer-guide/**,
- docs/documentation.rst,
- docs/getting-started-guide/**,
- docs/opendaylight-with-openstack/**,
- docs/release-notes/projects/**,
- docs/templates/template-user-guide.rst,
- docs/user-guide/**
--- /dev/null
+---
+repos:
+ - repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v1.3.0
+ hooks:
+ - id: trailing-whitespace
+
+ - repo: https://github.com/jorisroovers/gitlint
+ rev: v0.11.0
+ hooks:
+ - id: gitlint
+
+ - repo: https://github.com/Lucas-C/pre-commit-hooks
+ sha: v1.1.6
+ hooks:
+ - id: remove-tabs
+ exclude: >
+ (?x)^(
+ .git/COMMIT_EDITMSG|
+ docs/make.bat|
+ docs/Makefile
+ )$
[tox]
minversion = 1.6
-envlist = coala,docs
+envlist = pre-commit,docs
skipsdist = true
-[testenv:coala]
-basepython = python3
-deps =
- coala==0.11
- coala-bears==0.11
- # Requests 2.16 breaks coala dependency on chardet
- requests<2.16
- nodeenv==1.1.2
-commands =
- nodeenv -p
- npm install --global remark-cli remark-lint
- coala --non-interactive
-
[testenv:docs]
deps = -rdocs/requirements.txt
commands =
[testenv:docs-linkcheck]
deps = -rdocs/requirements.txt
commands = sphinx-build -j auto -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck
+
+[testenv:pre-commit]
+deps = pre-commit
+commands =
+ pre-commit install
+ pre-commit install --hook-type commit-msg
+ pre-commit run --all-files