Browse Source

feat(luacheckrc): some internal rules improvements

my-config
NTBBloodbath 3 years ago
parent
commit
d34e1043d4
No known key found for this signature in database GPG Key ID: 18D6730BC846AAC5
  1. 21
      .luacheckrc

21
.luacheckrc

@ -1,24 +1,29 @@
stds.nvim = { stds.nvim = {
read_globals = { "vim", "jit" }, globals = {
vim = { fields = { "g" } },
table = { fields = { "unpack" } },
package = { fields = { "searchers" } },
},
read_globals = {
"vim",
"jit",
"packer_plugins",
},
} }
std = "lua51+nvim" std = "lua51+nvim"
-- Rerun tests only if their modification time changed. -- Rerun tests only if their modification time changed.
cache = true cache = true
-- NOTE: rules from 100...400 are specific for Neovim stuff, e.g. vim.opt -- NOTE: rules from 200...400 are specific for Neovim stuff, e.g. vim.opt
ignore = { ignore = {
"113", -- Accessing an undefined global variable.
"121", -- Setting a read-only global variable.
"122/vim", -- Setting a read-only field of a global variable.
"143", -- Accessing an undefined field of a global variable.
"212/_.*", -- Unused argument, for variables with "_" prefix. "212/_.*", -- Unused argument, for variables with "_" prefix.
"331", -- Value assigned to a local variable is mutated but never accessed. "331", -- Value assigned to a local variable is mutated but never accessed.
"631", -- Line is too long. "631", -- Line is too long.
} }
exclude_files = { exclude_files = {
"plugin/packer_compiled.lua" "plugin/packer_compiled.lua",
} }
-- vim: ft=lua -- vim: ft=lua sw=2 ts=2

Loading…
Cancel
Save