Enforce pylint using a pre-commit hook

Issue: HIC-149
Change-Id: I543c015bbbd7f36b4188d7bd4ef7dbe9bd8dc1d2
diff --git a/README.md b/README.md
index 72badc1..6adeaa5 100644
--- a/README.md
+++ b/README.md
@@ -175,10 +175,12 @@
     (hiccupenv) $ git ls-files '*.py' | xargs black
 
 Before committing a patchset, you are kindly asked to run the linting tools
-and format the code. For both linter and formatter, a git pre-commit hook
-can be set up. To activate, copy the pre-commit script that calls the tox
-command for the pre-commit hooks to the `.git/hooks` folder and make it
-executable:
+([flake8](http://flake8.pycqa.org/en/latest/) and
+[pylint](https://pylint.readthedocs.io/en/latest/))
+and format the code. For both linters and formatter, git pre-commit hooks
+can be set up. To activate, copy the pre-commit script that calls all
+scripts in `tools/hooks/pre-commit.d` to the `.git/hooks`
+folder and make it executable:
 
     (hiccupenv) $ cp tools/hooks/pre-commit .git/hooks/pre-commit
     (hiccupenv) $ chmod +x .git/hooks/pre-commit
diff --git a/requirements-dev-pylint.txt b/requirements-dev-pylint.txt
index 412c31d..0888bdb 100644
--- a/requirements-dev-pylint.txt
+++ b/requirements-dev-pylint.txt
@@ -1,2 +1,3 @@
 pylint >= 2.1.0, < 2.2.0
 pylint-django >= 2.0, < 2.1
+git-pylint-commit-hook >= 2.5.0, < 2.6.0
\ No newline at end of file
diff --git a/tools/hooks/pre-commit.d/pre-commit-pylint.sh b/tools/hooks/pre-commit.d/pre-commit-pylint.sh
new file mode 100755
index 0000000..adddda9
--- /dev/null
+++ b/tools/hooks/pre-commit.d/pre-commit-pylint.sh
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+# For usage see
+# https://git-pylint-commit-hook.readthedocs.io/en/latest/usage.html
+git-pylint-commit-hook --always-show-violations
\ No newline at end of file
diff --git a/tox.ini b/tox.ini
index 650641f..fd93580 100644
--- a/tox.ini
+++ b/tox.ini
@@ -40,11 +40,13 @@
 # Git pre-commit hooks: Run formatter and linters
 [testenv:pre-commit-hooks]
 deps =
+    -rrequirements.txt
     -rrequirements-dev.txt
 passenv = GIT_INDEX_FILE
 commands =
     {toxinidir}/tools/hooks/pre-commit.d/pre-commit-black.sh
     python {toxinidir}/tools/hooks/pre-commit.d/pre-commit-flake8.py
+    {toxinidir}/tools/hooks/pre-commit.d/pre-commit-pylint.sh
 
 # Flake8 configuration
 [flake8]