aboutsummaryrefslogtreecommitdiffstats
path: root/.luacheckrc
blob: 7d5c6745e2b2f1a2f7029fa034f9d231aee11cf5 (plain)
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
codes = true
std = 'min'

exclude_files = {
  '/**/contrib/**',
  '/**/test/lua/**',
  '/**/test/functional/lua/miltertest/**',
  '/**/test/functional/lua/rspamadm/**',
  '.git/**/',
}

globals = {
  'check_header_delimiter_empty',
  'check_header_delimiter_tab',
  'classifiers',
  'config',
  'confighelp',
  'kmail_msgid',
  'rspamd_classifiers',
  'rspamd_config',
  'rspamd_count_metatokens',
  'rspamd_gen_metatokens',
  'rspamd_parse_redis_server',
  'rspamd_paths',
  'rspamd_plugins',
  'rspamd_redis_make_request',
  'rspamd_str_split',
  'rspamd_version',
  'rspamd_map_add',
  'rspamd_maps',
  'rspamd_plugins_state',
  'rspamadm',
  'loadstring',
  'rspamadm_ev_base',
  'rspamadm_session',
  'jit'
}

ignore = {
  '212', -- unused argument
  '612', -- trailing whitespace
  '311', -- value assigned to variable X is unused
}

files['/**/src/plugins/lua/spamassassin.lua'].globals = {
  'ffi',
  'jit',
}

files['/**/src/plugins/lua/greylist.lua'].globals = {
  'math.ifloor',
}

files['/**/lualib/lua_util.lua'].globals = {
  'table.unpack',
  'unpack',
}

files['/**/lualib/lua_redis.lua'].globals = {
  'rspamadm_ev_base',
}

files['/**/src/rspamadm/*'].globals = {
  'ansicolors',
  'getopt',
}

files['test/functional/lua/test_coverage.lua'].globals = {
  '__GLOBAL_COVERAGE_WATCHDOG'
}

files['/**/rules/'].ignore = {'631'}
files['/**/test/functional/'].ignore = {'631'}

max_string_line_length = 500
max_comment_line_length = 500