Skip to content

Commit

Permalink
CI: add lua lint check
Browse files Browse the repository at this point in the history
We now have our first lua script so we should start checking that for
obvious problems
  • Loading branch information
lelutin committed Aug 29, 2024
1 parent 6ff2177 commit d7105ae
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/vader.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
run: pip install --pre vim-vint
- name: Lint vimscript files
run: vint --warning --enable-neovim ./after ./autoload ./compiler ./ftdetect ./ftplugin ./indent ./syntax
- uses: lunarmodules/luacheck@v1
- uses: ludeeus/action-shellcheck@master

tests:
Expand Down
20 changes: 20 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-- vim: ft=lua tw=80

-- Global objects defined by the C code
read_globals = {
vim = {
filetype = {
fields = {
add = {},
match = {},
}
},
b = {
fields = {
epuppet_subtype = {
read_only=false,
}
}
}
}
}
4 changes: 2 additions & 2 deletions ftdetect/puppet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ vim.filetype.add({
extension = {
epp =
function(path, bufnr)
path_wo_epp = path:sub(1,-5)
matched = vim.filetype.match({ buf = bufnr, filename = path_wo_epp })
local path_wo_epp = path:sub(1,-5)
local matched = vim.filetype.match({ buf = bufnr, filename = path_wo_epp })
if matched ~= nil and matched ~= 'mason' then
vim.b.epuppet_subtype = matched
end
Expand Down

0 comments on commit d7105ae

Please sign in to comment.