Luacheck: use config file to exclude files

This commit is contained in:
Santos Gallegos 2021-07-04 17:55:11 -05:00 committed by Stephan Seitz
parent 8b876207e6
commit 437e41e9fc
4 changed files with 11 additions and 7 deletions

View file

@ -17,7 +17,7 @@ jobs:
sudo luarocks install luacheck
- name: Run Luacheck
run: sudo ./scripts/style-check.sh
run: luacheck .
stylua:
name: StyLua

View file

@ -1,5 +1,10 @@
-- Rerun tests only if their modification time changed.
cache = true
codes = true
exclude_files = {
"tests/indent/lua/"
}
-- Glorious list of warnings: https://luacheck.readthedocs.io/en/stable/warnings.html
ignore = {

View file

@ -3,5 +3,8 @@
# Can be used as a pre-push hook
# Just symlink this file to .git/hooks/pre-push
echo "Running style check..."
./scripts/style-check.sh
echo "Running linter..."
luacheck .
echo "Checking formatting..."
stylua --check .

View file

@ -1,4 +0,0 @@
#!/usr/bin/env bash
# ignore indent test files
luacheck `find -name "*.lua" -not -path "./tests/indent/lua/*"` --codes