@@ -31,19 +31,46 @@ exclude_files = {
3131 " tests/plenary/*" ,
3232}
3333
34+ -- Special configuration for test files
35+ files [" tests/**/*.lua" ] = {
36+ -- Allow common globals used in testing
37+ globals = {
38+ -- Common testing globals
39+ " describe" , " it" , " before_each" , " after_each" , " teardown" , " pending" , " spy" , " stub" , " mock" ,
40+ -- Lua standard utilities used in tests
41+ " print" , " dofile" ,
42+ -- Test helpers
43+ " test" , " expect" ,
44+ -- Global test state (allow modification)
45+ " _G" ,
46+ },
47+
48+ -- Define fields for assert from luassert
49+ read_globals = {
50+ assert = {
51+ fields = {
52+ " is_true" , " is_false" , " is_nil" , " is_not_nil" , " equals" ,
53+ " same" , " near" , " matches" , " has_error" ,
54+ " truthy" , " falsy" , " has" , " has_no" , " is_string" , " is_number" ,
55+ " is_function" , " is_table"
56+ }
57+ }
58+ },
59+
60+ -- For test files only, ignore unused arguments as they're often used for mock callbacks
61+ unused_args = false ,
62+ }
63+
3464-- Allow unused self arguments of methods
3565self = false
3666
3767-- Don't report unused arguments/locals
3868unused_args = false
3969unused = false
4070
41- -- Ignore warnings related to whitespace
71+ -- We don't ignore any warnings - all code style issues should be fixed
4272ignore = {
43- " 611" , -- Line contains trailing whitespace
44- " 612" , -- Line contains trailing whitespace in a comment
45- " 613" , -- Line contains trailing whitespace in a string
46- " 614" , -- Line contains only whitespace
73+ -- No ignored warnings
4774}
4875
4976-- Maximum line length
0 commit comments