Use Luacheck as a pre-commit hook

- Update pre-commit hooks to 2.1.0
master
Hugo Locurcio 2019-04-03 00:28:06 +02:00
parent 868b6bbc39
commit 8389a98d68
No known key found for this signature in database
GPG Key ID: 39E8F8BE30B0A49C
2 changed files with 16 additions and 7 deletions

View File

@ -1,6 +1,14 @@
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.0.0
hooks:
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.1.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
args: [--fix=lf]
- repo: https://github.com/Calinou/pre-commit-luacheck
rev: v1.0.0
hooks:
- id: luacheck

View File

@ -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 .