From 364b78757815ab263980222bfd61412c3224a5b8 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Sat, 21 Feb 2026 23:25:42 -0500 Subject: [PATCH] build: replace luacheck with selene Problem: luacheck is unmaintained (last release 2018) and required suppressing four warning classes to avoid false positives. It also lacks first-class vim/neovim awareness. Solution: switch to selene with std='vim' for vim-aware linting. Replace the luacheck CI job with selene, update the Makefile lint target, and delete .luacheckrc. --- .github/workflows/tests.yml | 17 +++++------------ .luacheckrc | 19 ------------------- Makefile | 2 +- selene.toml | 1 + 4 files changed, 7 insertions(+), 32 deletions(-) delete mode 100644 .luacheckrc create mode 100644 selene.toml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 462bb8f..8b1cc58 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,21 +10,14 @@ on: - main jobs: - luacheck: - name: Luacheck + selene: + name: Selene runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 - - - name: Prepare - run: | - sudo apt-get update - sudo add-apt-repository universe - sudo apt install luarocks -y - sudo luarocks install luacheck - - - name: Run Luacheck - run: luacheck lua tests + - uses: NTBBloodbath/selene-action@v1.0.0 + with: + args: --display-style quiet . stylua: name: StyLua diff --git a/.luacheckrc b/.luacheckrc deleted file mode 100644 index 7efefde..0000000 --- a/.luacheckrc +++ /dev/null @@ -1,19 +0,0 @@ -max_comment_line_length = false -codes = true - -exclude_files = { - "tests/treesitter", -} - -ignore = { - "212", -- Unused argument - "631", -- Line is too long - "122", -- Setting a readonly global - "542", -- Empty if branch -} - -read_globals = { - "vim", - "a", - "assert", -} diff --git a/Makefile b/Makefile index 897b281..966374d 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ test: .PHONY: lint lint: scripts/nvim-typecheck-action ./scripts/nvim-typecheck-action/typecheck.sh --workdir scripts/nvim-typecheck-action lua - luacheck lua tests --formatter plain + selene --display-style quiet . stylua --check lua tests ## profile: use LuaJIT profiler to profile the plugin diff --git a/selene.toml b/selene.toml new file mode 100644 index 0000000..96cf5ab --- /dev/null +++ b/selene.toml @@ -0,0 +1 @@ +std = 'vim'