forked from alvaro17f/nvim
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.luacheckrc
More file actions
81 lines (70 loc) · 1.7 KB
/
.luacheckrc
File metadata and controls
81 lines (70 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
-- .luacheckrc for Neovim configuration
-- Global objects defined by Neovim
globals = {
"vim",
"describe",
"it",
"before_each",
"after_each",
"pending",
"teardown",
}
-- Don't report unused self arguments of methods
self = false
-- Only ignore warnings that we consciously choose to ignore
-- Note: We don't ignore any whitespace warnings (611, 612, 613, 614)
ignore = {
"212/self", -- Unused argument 'self' in test functions is fine
"212/_.*", -- Unused arguments prefixed with underscore are fine (e.g., _config)
"213", -- Unused loop variables
}
-- Exclusions for test files
files["tests/minimal-init.lua"] = {
-- Allow unused arguments in mock functions
ignore = {"212"},
}
-- Ignore long lines in README generation
files["lua/config/keymaps.lua"] = {
-- Allow long lines in the README generation section
ignore = {"631"}, -- Ignore "line is too long" warnings
}
files["tests/run_tests.lua"] = {
-- Allow unused arguments in test framework
ignore = {"212"},
}
files["tests/**/spec/**"] = {
-- Allow even more relaxed rules in test specs
ignore = {"212", "142"}, -- Ignore unused vars and setting undefined fields
}
-- File patterns to exclude
exclude_files = {
"lua/lazy/*",
".luarocks/*",
}
-- Allowed global functions in tests
files["tests/**"] = {
globals = {
"describe",
"it",
"before_each",
"after_each",
"setup",
"teardown",
"assert",
"spy",
"stub",
"mock",
"dofile",
"load",
"package",
}
}
-- Set the max line length to 120
max_line_length = 120
-- Settings for third-party libraries
files["**/lazy.lua"] = {
-- Lazy.nvim uses its own globals
globals = {"vim", "require"},
}
-- Run in parallel when possible
jobs = 4