ci: add luacheck

This commit is contained in:
Ade Attwood 2022-08-06 15:02:42 +01:00 committed by Ade Attwood
parent f2a22c2190
commit 5d6546d414
3 changed files with 23 additions and 0 deletions

View file

@ -19,6 +19,22 @@ jobs:
with:
args: conventional-tools commitlint -l1
luacheck:
name: Luacheck
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install luarocks
run: sudo apt update && sudo apt install -y luarocks
- name: Install luacheck
run: sudo luarocks install luacheck
- name: Run luacheck
run: luacheck .
test:
name: Build and test
runs-on: ubuntu-latest

View file

@ -9,4 +9,10 @@ self = false
-- Global objects defined by the C code
read_globals = {
"vim",
"it",
"after",
"after_each",
"before",
"before_each",
}

View file

@ -4,6 +4,7 @@ local libivy = require "ivy.libivy"
-- Put the controller in to the vim global so we can access it in mappings
-- better without requires. You can call controller commands like `vim.ivy.xxx`.
-- luacheck: ignore
vim.ivy = controller
vim.api.nvim_create_user_command("IvyAg", function()