Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,16 @@ jobs:
- name: Lint
run: sudo make lint

selene:
name: Selene
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Run selene
uses: NTBBloodbath/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --display-style quiet lua/plenary --allow-warnings
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: test generate_filetypes lint luarocks_upload test_luarocks_install
.PHONY: test generate_filetypes lint lint-selene luarocks_upload test_luarocks_install
test:
nvim --headless --noplugin -u scripts/minimal.vim -c "PlenaryBustedDirectory tests/plenary/ {minimal_init = 'tests/minimal_init.vim', sequential = true}"

Expand All @@ -10,3 +10,6 @@ generate_luassert_types:

lint:
luacheck lua/plenary

lint-selene:
selene --display-style quiet lua/plenary --allow-warnings
33 changes: 33 additions & 0 deletions neovim.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
base: lua51

globals:
_:
any: true
a:
any: true
jit:
any: true
bit:
any: true
vim:
any: true
assert:
args:
- type: bool
- type: string
required: false
after_each:
args:
- type: function
before_each:
args:
- type: function
describe:
args:
- type: string
- type: function
it:
args:
- type: string
- type: function
17 changes: 17 additions & 0 deletions selene.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
std="neovim"

exclude = [
"lua/plenary/profile/lua_profiler.lua",
"lua/plenary/profile/memory_profiler.lua",
"lua/plenary/profile/p.lua", # token `goto` detected as `parse_error`
"lua/plenary/async_lib/*.lua",
]

[rules]
global_usage = "warn"
deprecated = "warn" # If change for `allow` it will rely in `lua_ls` diagnostics alone
multiple_statements = "warn"
incorrect_standard_library_use = "allow" # This is for cases like `string.format`, `package.config`, etc.
mixed_table = "allow"
unused_variable = "warn"
undefined_variable = "warn"