fix(nvim-lint): dont evaluate conditions for linter functions. Fixes #1569

This commit is contained in:
Folke Lemaitre 2023-10-03 16:32:05 +02:00
parent 63467c1f21
commit b1ad48067e
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -49,7 +49,7 @@ return {
ctx.dirname = vim.fn.fnamemodify(ctx.filename, ":h")
names = vim.tbl_filter(function(name)
local linter = lint.linters[name]
return linter and not (linter.condition and not linter.condition(ctx))
return linter and not (type(linter) == "table" and linter.condition and not linter.condition(ctx))
end, names)
if #names > 0 then