aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/lint.yml2
-rw-r--r--.luacheckrc5
-rwxr-xr-xscripts/pre-push7
-rwxr-xr-xscripts/style-check.sh4
4 files changed, 11 insertions, 7 deletions
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 16d8fdb2e..697279895 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -17,7 +17,7 @@ jobs:
sudo luarocks install luacheck
- name: Run Luacheck
- run: sudo ./scripts/style-check.sh
+ run: luacheck .
stylua:
name: StyLua
diff --git a/.luacheckrc b/.luacheckrc
index cb61432f9..b0ee19d8a 100644
--- a/.luacheckrc
+++ b/.luacheckrc
@@ -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 = {
diff --git a/scripts/pre-push b/scripts/pre-push
index 00d4c5071..8d425b3b6 100755
--- a/scripts/pre-push
+++ b/scripts/pre-push
@@ -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 .
diff --git a/scripts/style-check.sh b/scripts/style-check.sh
deleted file mode 100755
index 8dfb53aa2..000000000
--- a/scripts/style-check.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/usr/bin/env bash
-
-# ignore indent test files
-luacheck `find -name "*.lua" -not -path "./tests/indent/lua/*"` --codes