From 844bcc920b86d1a2505d45b901d4dc0aef5574fd Mon Sep 17 00:00:00 2001 From: Thanh Ha Date: Fri, 10 May 2019 21:24:47 -0400 Subject: [PATCH] Use pre-commit instead of Coala Considering that all we're using Coala for is for the GitCommitBear let's drop Coala in favor of pre-commit as it's faster and more convenient. Signed-off-by: Thanh Ha Change-Id: I0a5dfee8eab3680f472bb6ad6b62c79e7ba4a7b2 --- .coafile | 16 ---------------- .pre-commit-config.yaml | 11 +++++++++++ tox.ini | 19 ++++++++----------- 3 files changed, 19 insertions(+), 27 deletions(-) delete mode 100644 .coafile create mode 100644 .pre-commit-config.yaml diff --git a/.coafile b/.coafile deleted file mode 100644 index de44e1f..0000000 --- a/.coafile +++ /dev/null @@ -1,16 +0,0 @@ -[all] -ignore = .tox/**, - .git/**, - .gitignore, - .gitmodules, - .gitreview - -[all.Git] -bears = GitCommitBear -files = NONE -ignore_length_regex = Signed-off-by, - Also-by, - Co-authored-by, - http://, - https:// - diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..c1879a6 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,11 @@ +--- +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 diff --git a/tox.ini b/tox.ini index fe432b3..61059d5 100644 --- a/tox.ini +++ b/tox.ini @@ -1,19 +1,10 @@ [tox] minversion = 1.6 envlist = - coala, - molecule + molecule, + pre-commit skipsdist=true -[testenv:coala] -basepython = python3 -deps = - coala - coala-bears -commands = - python3 -m nltk.downloader punkt maxent_treebank_pos_tagger averaged_perceptron_tagger - coala --non-interactive - [testenv:molecule] basepython = python2 deps = @@ -24,3 +15,9 @@ deps = passenv = * commands = ./molecule.sh + +[testenv:pre-commit] +deps = pre-commit +commands = + pre-commit install --hook-type commit-msg + pre-commit run --all-files \ No newline at end of file -- 2.16.6