File tree 2 files changed +5
-43
lines changed
2 files changed +5
-43
lines changed Original file line number Diff line number Diff line change @@ -137,14 +137,9 @@ def quickfixes_from_response(ctx, response):
137
137
'vcol' : 0
138
138
}
139
139
if 'LogLevel' in quickfix :
140
- if quickfix ['LogLevel' ] == 'Error' :
141
- item ['type' ] = 'E'
142
- elif quickfix ['LogLevel' ] == 'Warning' :
143
- item ['type' ] = 'W'
144
- elif quickfix ['LogLevel' ] == 'Info' :
145
- item ['type' ] = 'I'
146
- else :
147
- continue
140
+ item ['type' ] = 'E' if quickfix ['LogLevel' ] == 'Error' else 'W'
141
+ if quickfix ['LogLevel' ] == 'Hidden' :
142
+ item ['subtype' ] = 'Style'
148
143
149
144
items .append (item )
150
145
Original file line number Diff line number Diff line change @@ -180,25 +180,13 @@ def test_quickfixes_from_response(ctx):
180
180
]
181
181
assert qf == expected
182
182
183
- response = [
184
- {
185
- 'Text' : 'some text' ,
186
- 'Line' : 5 ,
187
- 'Column' : 8 ,
188
- 'LogLevel' : 'Hidden' ,
189
- },
190
- ]
191
- qf = quickfixes_from_response (ctx , response )
192
- expected = []
193
- assert qf == expected
194
-
195
183
response = [
196
184
{
197
185
'FileName' : 'foo.cs' ,
198
186
'Text' : 'some text' ,
199
187
'Line' : 5 ,
200
188
'Column' : 8 ,
201
- 'LogLevel' : 'Warning ' ,
189
+ 'LogLevel' : 'Hidden ' ,
202
190
},
203
191
]
204
192
qf = quickfixes_from_response (ctx , response )
@@ -210,28 +198,7 @@ def test_quickfixes_from_response(ctx):
210
198
'col' : 8 ,
211
199
'vcol' : 0 ,
212
200
'type' : 'W' ,
213
- },
214
- ]
215
- assert qf == expected
216
-
217
- response = [
218
- {
219
- 'FileName' : 'foo.cs' ,
220
- 'Text' : 'some text' ,
221
- 'Line' : 5 ,
222
- 'Column' : 8 ,
223
- 'LogLevel' : 'Info' ,
224
- },
225
- ]
226
- qf = quickfixes_from_response (ctx , response )
227
- expected = [
228
- {
229
- 'filename' : 'foo.cs' ,
230
- 'text' : 'some text' ,
231
- 'lnum' : 5 ,
232
- 'col' : 8 ,
233
- 'vcol' : 0 ,
234
- 'type' : 'I' ,
201
+ 'subtype' : 'Style' ,
235
202
},
236
203
]
237
204
assert qf == expected
You can’t perform that action at this time.
0 commit comments