-
-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feat] selene
linter support
#579
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Motivation
I have been using selene in my projects lately and I think is a more strict linter in some cases, showing more
errors
orwarnings
to catch whatluacheck
do not.Example config
In the root project.
selene.toml
neovim.yml
With these two files in the root of the project,
selene --display-style quiet lua/plenary --allow-warnings
results in the following.plenary.nvim/lua/plenary/busted.lua
Lines 1 to 18 in 08e3019
Note
The error shown is because in
lua/plenary/busted.lua
we are using the functiondirname
with 1 argument.But in the line
13
,dirname(debug.getinfo(1, "Sl").source, ":h")
is using 2. Unlike in line18
,dirname(info.source)
is just using one as the declaration forlocal dirname = function(p)
indicates.If we fix that error,
dirname(debug.getinfo(1, "Sl").source, ":h")
->dirname(debug.getinfo(1, "Sl").source)
. The command forselene
with the--allow-warnings
flag will result in asuccess
exit code when linting.Integrations
For the
CI
process it will be easy.Makefile
to include:make lint-selene
:selene --display-style quiet lua/plenary --allow-warnings
selene
job toworkflows
:Note
More about
selene
action hereThe text was updated successfully, but these errors were encountered: