From 644c33e36a66cd5ca93f57ae2b595bd408e5e9ab Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Wed, 3 Apr 2019 00:29:43 +0200 Subject: [PATCH] Use Luacheck as a pre-commit hook --- .pre-commit-config.yaml | 5 +++++ .travis.yml | 3 ++- 2 files changed, 7 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..a032acb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,5 +11,6 @@ install: - luarocks install --local luacheck script: + # All linters are run with pre-commit hooks + - export PATH="$HOME/.luarocks/bin:$PATH" - $HOME/.local/bin/pre-commit run --all-files - - $HOME/.luarocks/bin/luacheck .