@@ -60,7 +60,6 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
60
60
in_fixture ( __DIR__ , "dialyzer" , fn ->
61
61
file_a = SourceFile.Path . to_uri ( Path . absname ( "lib/a.ex" ) )
62
62
63
- # capture_log(fn ->
64
63
initialize ( server , % { "dialyzerEnabled" => true , "dialyzerFormat" => "dialyxir_long" } )
65
64
66
65
message = assert_receive % { "method" => "textDocument/publishDiagnostics" } , 20000
@@ -115,14 +114,12 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
115
114
40000
116
115
117
116
wait_until_compiled ( server )
118
- # end)
119
117
end )
120
118
end
121
119
122
120
@ tag slow: true , fixture: true
123
121
test "only analyzes the changed files" , % { server: server } do
124
122
in_fixture ( __DIR__ , "dialyzer" , fn ->
125
- # capture_log(fn ->
126
123
initialize ( server , % { "dialyzerEnabled" => true , "dialyzerFormat" => "dialyxir_long" } )
127
124
128
125
assert_receive % { "method" => "textDocument/publishDiagnostics" } , 20_000
@@ -163,7 +160,6 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
163
160
3_000
164
161
165
162
wait_until_compiled ( server )
166
- # end)
167
163
end )
168
164
end
169
165
@@ -172,10 +168,7 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
172
168
in_fixture ( __DIR__ , "dialyzer" , fn ->
173
169
file_a = SourceFile.Path . to_uri ( Path . absname ( "lib/a.ex" ) )
174
170
175
- # capture_log(fn ->
176
- IO . warn ( "init" )
177
171
initialize ( server , % { "dialyzerEnabled" => true , "dialyzerFormat" => "dialyxir_long" } )
178
- IO . warn ( "init done" )
179
172
180
173
message = assert_receive % { "method" => "textDocument/publishDiagnostics" } , 20000
181
174
@@ -213,7 +206,6 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
213
206
"""
214
207
215
208
wait_until_compiled ( server )
216
- # end)
217
209
end )
218
210
end
219
211
@@ -222,7 +214,6 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
222
214
in_fixture ( __DIR__ , "dialyzer" , fn ->
223
215
file_a = SourceFile.Path . to_uri ( Path . absname ( "lib/a.ex" ) )
224
216
225
- # capture_log(fn ->
226
217
initialize ( server , % { "dialyzerEnabled" => true , "dialyzerFormat" => "dialyxir_short" } )
227
218
228
219
message = assert_receive % { "method" => "textDocument/publishDiagnostics" } , 20000
@@ -251,7 +242,6 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
251
242
assert error_message1 == "Function fun/0 has no local return."
252
243
assert error_message2 == "The pattern can never match the type :error."
253
244
wait_until_compiled ( server )
254
- # end)
255
245
end )
256
246
end
257
247
@@ -260,7 +250,6 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
260
250
in_fixture ( __DIR__ , "dialyzer" , fn ->
261
251
file_a = SourceFile.Path . to_uri ( Path . absname ( "lib/a.ex" ) )
262
252
263
- # capture_log(fn ->
264
253
initialize ( server , % { "dialyzerEnabled" => true , "dialyzerFormat" => "dialyzer" } )
265
254
266
255
message = assert_receive % { "method" => "textDocument/publishDiagnostics" } , 20000
@@ -288,9 +277,8 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
288
277
289
278
assert error_message1 == "Function 'fun'/0 has no local return"
290
279
291
- # Note: Don't assert on error_messaage 2 because the message is not stable across OTP versions
280
+ # Note: Don't assert on error_message 2 because the message is not stable across OTP versions
292
281
wait_until_compiled ( server )
293
- # end)
294
282
end )
295
283
end
296
284
@@ -299,7 +287,6 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
299
287
in_fixture ( __DIR__ , "umbrella_dialyzer" , fn ->
300
288
file_a = SourceFile.Path . to_uri ( Path . absname ( "apps/app1/lib/app1.ex" ) )
301
289
302
- # capture_log(fn ->
303
290
initialize ( server , % { "dialyzerEnabled" => true , "dialyzerFormat" => "dialyxir_short" } )
304
291
305
292
message = assert_receive % { "method" => "textDocument/publishDiagnostics" } , 20000
@@ -328,15 +315,13 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
328
315
assert error_message1 == "Function check_error/0 has no local return."
329
316
assert error_message2 == "The pattern can never match the type :error."
330
317
wait_until_compiled ( server )
331
- # end)
332
318
end )
333
319
end
334
320
335
321
test "clears diagnostics when source files are deleted" , % { server: server } do
336
322
in_fixture ( __DIR__ , "dialyzer" , fn ->
337
323
file_a = SourceFile.Path . to_uri ( Path . absname ( "lib/a.ex" ) )
338
324
339
- # capture_log(fn ->
340
325
initialize ( server , % { "dialyzerEnabled" => true } )
341
326
342
327
assert_receive publish_diagnostics_notif ( ^ file_a , [ _ , _ ] ) , 20000
@@ -346,7 +331,6 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
346
331
Server . receive_packet ( server , did_change_watched_files ( [ % { "uri" => file_a , "type" => 3 } ] ) )
347
332
assert_receive publish_diagnostics_notif ( ^ file_a , [ ] ) , 20000
348
333
wait_until_compiled ( server )
349
- # end)
350
334
end )
351
335
end
352
336
@@ -422,7 +406,6 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
422
406
in_fixture ( __DIR__ , "dialyzer" , fn ->
423
407
file_c = SourceFile.Path . to_uri ( Path . absname ( "lib/c.ex" ) )
424
408
425
- # capture_log(fn ->
426
409
initialize ( server , % {
427
410
"dialyzerEnabled" => true ,
428
411
"dialyzerFormat" => "dialyxir_long" ,
@@ -447,7 +430,6 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
447
430
448
431
assert response ( 3 , [ ] ) == resp
449
432
wait_until_compiled ( server )
450
- # end)
451
433
end )
452
434
end
453
435
@@ -456,7 +438,6 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
456
438
in_fixture ( __DIR__ , "dialyzer" , fn ->
457
439
file_c = SourceFile.Path . to_uri ( Path . absname ( "lib/c.ex" ) )
458
440
459
- # capture_log(fn ->
460
441
initialize ( server , % {
461
442
"dialyzerEnabled" => true ,
462
443
"dialyzerFormat" => "dialyxir_long" ,
@@ -533,7 +514,6 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
533
514
534
515
assert_receive ( % { "id" => 4 , "result" => nil } , 5000 )
535
516
wait_until_compiled ( server )
536
- # end)
537
517
end )
538
518
end
539
519
end
0 commit comments