Skip to content

Commit 2faca97

Browse files
committed
Roll back 'Hidden' diagnostic suppression
1 parent af465ca commit 2faca97

File tree

2 files changed

+5
-43
lines changed

2 files changed

+5
-43
lines changed

python/omnisharp/util.py

+3-8
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,9 @@ def quickfixes_from_response(ctx, response):
137137
'vcol': 0
138138
}
139139
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'
148143

149144
items.append(item)
150145

python/tests/test_util.py

+2-35
Original file line numberDiff line numberDiff line change
@@ -180,25 +180,13 @@ def test_quickfixes_from_response(ctx):
180180
]
181181
assert qf == expected
182182

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-
195183
response = [
196184
{
197185
'FileName': 'foo.cs',
198186
'Text': 'some text',
199187
'Line': 5,
200188
'Column': 8,
201-
'LogLevel': 'Warning',
189+
'LogLevel': 'Hidden',
202190
},
203191
]
204192
qf = quickfixes_from_response(ctx, response)
@@ -210,28 +198,7 @@ def test_quickfixes_from_response(ctx):
210198
'col': 8,
211199
'vcol': 0,
212200
'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',
235202
},
236203
]
237204
assert qf == expected

0 commit comments

Comments
 (0)