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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
|
Before:
runtime ale_linters/tcl/nagelfar.vim
After:
call ale#linter#Reset()
Execute(The nagelfar handler should parse lines correctly):
AssertEqual
\ [
\ {
\ 'lnum': 5,
\ 'type': 'W',
\ 'text': 'Found constant "bepa" which is also a variable.'
\ },
\ {
\ 'lnum': 7,
\ 'type': 'E',
\ 'text': 'Unknown variable "cep"'
\ },
\ {
\ 'lnum': 7,
\ 'type': 'W',
\ 'text': 'Unknown command "se"'
\ },
\ {
\ 'lnum': 8,
\ 'type': 'E',
\ 'text': 'Unknown variable "epa"'
\ },
\ {
\ 'lnum': 10,
\ 'type': 'E',
\ 'text': 'Unknown variable "depa"'
\ },
\ {
\ 'lnum': 10,
\ 'type': 'W',
\ 'text': 'Suspicious variable name "$depa"'
\ },
\ {
\ 'lnum': 11,
\ 'type': 'W',
\ 'text': 'Suspicious variable name "$cepa"'
\ },
\ {
\ 'lnum': 13,
\ 'type': 'E',
\ 'text': 'Wrong number of arguments (3) to "set"'
\ },
\ {
\ 'lnum': 13,
\ 'type': 'W',
\ 'text': 'Found constant "bepa" which is also a variable.'
\ },
\ {
\ 'lnum': 13,
\ 'type': 'W',
\ 'text': 'Found constant "cepa" which is also a variable.'
\ },
\ {
\ 'lnum': 18,
\ 'type': 'E',
\ 'text': 'Badly formed if statement'
\ },
\ {
\ 'lnum': 24,
\ 'type': 'E',
\ 'text': 'Unknown subcommand "gurka" to "info"'
\ },
\ {
\ 'lnum': 31,
\ 'type': 'W',
\ 'text': 'Switch pattern starting with #. This could be a bad comment.'
\ },
\ {
\ 'lnum': 31,
\ 'type': 'W',
\ 'text': 'Unknown command "This"'
\ },
\ {
\ 'lnum': 31,
\ 'type': 'W',
\ 'text': 'Unknown command "bad"'
\ },
\ {
\ 'lnum': 34,
\ 'type': 'W',
\ 'text': 'Unknown command "miffo"'
\ },
\ {
\ 'lnum': 55,
\ 'type': 'W',
\ 'text': 'Suspicious variable name "$bepa"'
\ },
\ {
\ 'lnum': 56,
\ 'type': 'W',
\ 'text': 'Suspicious variable name "$apa"'
\ },
\ {
\ 'lnum': 61,
\ 'type': 'E',
\ 'text': 'Could not complete statement.'
\ },
\ {
\ 'lnum': 67,
\ 'type': 'E',
\ 'text': 'Could not complete statement.'
\ },
\ {
\ 'lnum': 70,
\ 'type': 'E',
\ 'text': 'Wrong number of arguments (4) to "proc"'
\ },
\ {
\ 'lnum': 72,
\ 'type': 'E',
\ 'text': 'Wrong number of arguments (1) to "if"'
\ },
\ {
\ 'lnum': 75,
\ 'type': 'E',
\ 'text': 'Unbalanced close brace found'
\ },
\ {
\ 'lnum': 82,
\ 'type': 'E',
\ 'text': 'Unbalanced close brace found'
\ },
\ {
\ 'lnum': 88,
\ 'type': 'E',
\ 'text': 'Could not complete statement.'
\ },
\ {
\ 'lnum': 90,
\ 'type': 'E',
\ 'text': 'Wrong number of arguments (1) to "if"'
\ },
\ {
\ 'lnum': 93,
\ 'type': 'W',
\ 'text': 'Close brace not aligned with line 90 (4 0)'
\ },
\ ],
\ ale_linters#tcl#nagelfar#Handle(bufnr(''), [
\ 'Line 5: W Found constant "bepa" which is also a variable.',
\ 'Line 7: E Unknown variable "cep"',
\ 'Line 7: W Unknown command "se"',
\ 'Line 8: E Unknown variable "epa"',
\ 'Line 10: E Unknown variable "depa"',
\ 'Line 10: N Suspicious variable name "$depa"',
\ 'Line 11: N Suspicious variable name "$cepa"',
\ 'Line 13: E Wrong number of arguments (3) to "set"',
\ 'Line 13: W Found constant "bepa" which is also a variable.',
\ 'Line 13: W Found constant "cepa" which is also a variable.',
\ 'Line 18: E Badly formed if statement',
\ 'Line 24: E Unknown subcommand "gurka" to "info"',
\ 'Line 31: W Switch pattern starting with #. This could be a bad comment.',
\ 'Line 31: W Unknown command "This"',
\ 'Line 31: W Unknown command "bad"',
\ 'Line 34: W Unknown command "miffo"',
\ 'Line 55: N Suspicious variable name "$bepa"',
\ 'Line 56: N Suspicious variable name "$apa"',
\ 'Line 61: E Could not complete statement.',
\ 'Line 67: E Could not complete statement.',
\ 'Line 70: E Wrong number of arguments (4) to "proc"',
\ 'Line 72: E Wrong number of arguments (1) to "if"',
\ 'Line 75: E Unbalanced close brace found',
\ 'Line 82: E Unbalanced close brace found',
\ 'Line 88: E Could not complete statement.',
\ 'Line 90: E Wrong number of arguments (1) to "if"',
\ 'Line 93: N Close brace not aligned with line 90 (4 0)',
\ ])
|