.luacheckrc 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. -- vim: ft=lua tw=80
  2. stds.nvim = {
  3. read_globals = { "jit" }
  4. }
  5. std = "lua51+nvim"
  6. -- Ignore W211 (unused variable) with preload files.
  7. files["**/preload.lua"] = {ignore = { "211" }}
  8. -- Allow vim module to modify itself, but only here.
  9. files["src/nvim/lua/vim.lua"] = {ignore = { "122/vim" }}
  10. -- Don't report unused self arguments of methods.
  11. self = false
  12. -- Rerun tests only if their modification time changed.
  13. cache = true
  14. ignore = {
  15. "631", -- max_line_length
  16. "212/_.*", -- unused argument, for vars with "_" prefix
  17. "214", -- used variable with unused hint ("_" prefix)
  18. "121", -- setting read-only global variable 'vim'
  19. "122", -- setting read-only field of global variable 'vim'
  20. "581", -- negation of a relational operator- operator can be flipped (not for tables)
  21. }
  22. -- Global objects defined by the C code
  23. read_globals = {
  24. "vim",
  25. }
  26. globals = {
  27. "vim.g",
  28. "vim.b",
  29. "vim.w",
  30. "vim.o",
  31. "vim.bo",
  32. "vim.wo",
  33. "vim.go",
  34. "vim.env"
  35. }
  36. exclude_files = {
  37. 'test/_meta.lua',
  38. 'test/functional/fixtures/lua/syntax_error.lua',
  39. 'runtime/lua/vim/treesitter/_meta.lua',
  40. 'runtime/lua/vim/_meta/vimfn.lua',
  41. 'runtime/lua/vim/_meta/api.lua',
  42. 'runtime/lua/vim/re.lua',
  43. 'runtime/lua/coxpcall.lua',
  44. 'src/nvim/eval.lua',
  45. }