From 8d0697b99a3a6b26db197134a5b22d28bd8ddf05 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Fri, 12 Sep 2025 00:06:18 -0500 Subject: [PATCH 1/3] selene too --- .github/workflows/{stylua.yml => ci.yml} | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) rename .github/workflows/{stylua.yml => ci.yml} (59%) diff --git a/.github/workflows/stylua.yml b/.github/workflows/ci.yml similarity index 59% rename from .github/workflows/stylua.yml rename to .github/workflows/ci.yml index 19a16ae..b5295ae 100644 --- a/.github/workflows/stylua.yml +++ b/.github/workflows/ci.yml @@ -11,9 +11,15 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - + - uses: JohnnyMorganz/stylua-action@v4 with: token: ${{ secrets.GITHUB_TOKEN }} version: latest - args: --check . \ No newline at end of file + args: --check . + + - name: Lint with Selene + uses: NTBBloodbath/selene-action@v1.0.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --display-style quiet . From 2238022a245d159623662369b474fa8289ea1087 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Fri, 12 Sep 2025 00:11:37 -0500 Subject: [PATCH 2/3] fix selene lints --- lua/cp/init.lua | 2 +- lua/cp/snippets.lua | 8 ++------ vim.toml | 3 +++ 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/lua/cp/init.lua b/lua/cp/init.lua index 0673487..98a44e6 100644 --- a/lua/cp/init.lua +++ b/lua/cp/init.lua @@ -285,7 +285,7 @@ function M.setup(user_config) end end, { nargs = "*", - complete = function(ArgLead, CmdLine, ...) + complete = function(ArgLead, _, _) local commands = vim.list_extend(vim.deepcopy(competition_types), { "run", "debug", "diff" }) return vim.tbl_filter(function(cmd) return cmd:find(ArgLead, 1, true) == 1 diff --git a/lua/cp/snippets.lua b/lua/cp/snippets.lua index c81101e..4025324 100644 --- a/lua/cp/snippets.lua +++ b/lua/cp/snippets.lua @@ -8,12 +8,8 @@ function M.setup(config) local snippets = {} - for name, snippet in pairs(config.snippets or {}) do - if type(snippet) == "table" and snippet.trig then - table.insert(snippets, snippet) - else - table.insert(snippets, snippet) - end + for _, snippet in pairs(config.snippets or {}) do + table.insert(snippets, snippet) end if #snippets > 0 then diff --git a/vim.toml b/vim.toml index 61f4a6e..b3f8bba 100644 --- a/vim.toml +++ b/vim.toml @@ -2,5 +2,8 @@ base = "lua52" name = "vim" +[features] +lua52 = true + [vim] any = true From b44b1e79bfb0b4a604acbb7580c2648342b5a3d5 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Fri, 12 Sep 2025 00:13:50 -0500 Subject: [PATCH 3/3] fix ci --- .github/workflows/ci.yml | 2 +- selene.toml | 3 +++ vim.toml | 3 --- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5295ae..21d9968 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Stylua +name: ci on: pull_request: diff --git a/selene.toml b/selene.toml index d03ab0a..df08b7c 100644 --- a/selene.toml +++ b/selene.toml @@ -1 +1,4 @@ std = "vim" + +[config] +lua52 = true diff --git a/vim.toml b/vim.toml index b3f8bba..61f4a6e 100644 --- a/vim.toml +++ b/vim.toml @@ -2,8 +2,5 @@ base = "lua52" name = "vim" -[features] -lua52 = true - [vim] any = true