fix(ci): switch typecheck action to stevearc/nvim-typecheck-action (#26)
Problem: mrcjkb/lua-typecheck-action runs lua-language-server in a bare nix sandbox without neovim installed, causing 71 type errors for all vim.* and uv.* types. LuaLS 3.17.x also introduced stricter type checking that flags uv.aliases.fs_types mismatches not present in 3.16.4. The .luarc.json workspace.library entries conflicted with the action's auto-appended luvit-meta, producing duplicate uv type unions. Solution: switch to stevearc/nvim-typecheck-action@v2 (matching upstream), pin LuaLS to 3.16.4, convert .luarc.json to nested format without workspace.library (let the action provide VIMRUNTIME and luvit-meta), and add .direnv/* to selene.toml exclude for local use.
This commit is contained in:
parent
b4ab166c39
commit
7d410acaf1
3 changed files with 17 additions and 11 deletions
8
.github/workflows/quality.yaml
vendored
8
.github/workflows/quality.yaml
vendored
|
|
@ -62,12 +62,10 @@ jobs:
|
||||||
if: ${{ needs.changes.outputs.lua == 'true' }}
|
if: ${{ needs.changes.outputs.lua == 'true' }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Run Lua LS Type Check
|
- uses: stevearc/nvim-typecheck-action@v2
|
||||||
uses: mrcjkb/lua-typecheck-action@v0
|
|
||||||
with:
|
with:
|
||||||
checklevel: Warning
|
path: lua
|
||||||
directories: lua
|
luals-version: 3.16.4
|
||||||
configpath: .luarc.json
|
|
||||||
|
|
||||||
markdown-format:
|
markdown-format:
|
||||||
name: Markdown Format Check
|
name: Markdown Format Check
|
||||||
|
|
|
||||||
19
.luarc.json
19
.luarc.json
|
|
@ -1,8 +1,15 @@
|
||||||
{
|
{
|
||||||
"runtime.version": "Lua 5.1",
|
"runtime": {
|
||||||
"runtime.path": ["lua/?.lua", "lua/?/init.lua"],
|
"version": "LuaJIT",
|
||||||
"diagnostics.globals": ["vim", "jit", "bit"],
|
"pathStrict": true
|
||||||
"workspace.library": ["$VIMRUNTIME/lua", "${3rd}/luv/library"],
|
},
|
||||||
"workspace.checkThirdParty": false,
|
"workspace": {
|
||||||
"completion.callSnippet": "Replace"
|
"checkThirdParty": false
|
||||||
|
},
|
||||||
|
"type": {
|
||||||
|
"checkTableShape": true
|
||||||
|
},
|
||||||
|
"completion": {
|
||||||
|
"callSnippet": "Replace"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
std = 'vim'
|
std = 'vim'
|
||||||
|
exclude = [".direnv/*"]
|
||||||
|
|
||||||
[lints]
|
[lints]
|
||||||
mixed_table = 'allow'
|
mixed_table = 'allow'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue