From cea44dce57c4757e541a87cb6d7e445e57e05f0f Mon Sep 17 00:00:00 2001
From: Hugo Locurcio <hugo.locurcio@hugo.pro>
Date: Mon, 1 Apr 2019 11:02:31 +0200
Subject: [PATCH] Use Luacheck as a pre-commit hook

---
 .pre-commit-config.yaml | 5 +++++
 .travis.yml             | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 9c72498..22f1dbe 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -7,3 +7,8 @@ repos:
 
       - id: mixed-line-ending
         args: [--fix=lf]
+
+  - repo: https://github.com/Calinou/pre-commit-luacheck
+    rev: v1.0.0
+    hooks:
+      - id: luacheck
diff --git a/.travis.yml b/.travis.yml
index 1c4c0d8..efd3d07 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,5 +11,5 @@ install:
   - luarocks install --local luacheck
 
 script:
+  # All linters are run with pre-commit hooks
   - $HOME/.local/bin/pre-commit run --all-files
-  - $HOME/.luarocks/bin/luacheck .
-- 
GitLab