@@ -60,7 +60,6 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
6060 in_fixture ( __DIR__ , "dialyzer" , fn ->
6161 file_a = SourceFile.Path . to_uri ( Path . absname ( "lib/a.ex" ) )
6262
63- # capture_log(fn ->
6463 initialize ( server , % { "dialyzerEnabled" => true , "dialyzerFormat" => "dialyxir_long" } )
6564
6665 message = assert_receive % { "method" => "textDocument/publishDiagnostics" } , 20000
@@ -115,14 +114,12 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
115114 40000
116115
117116 wait_until_compiled ( server )
118- # end)
119117 end )
120118 end
121119
122120 @ tag slow: true , fixture: true
123121 test "only analyzes the changed files" , % { server: server } do
124122 in_fixture ( __DIR__ , "dialyzer" , fn ->
125- # capture_log(fn ->
126123 initialize ( server , % { "dialyzerEnabled" => true , "dialyzerFormat" => "dialyxir_long" } )
127124
128125 assert_receive % { "method" => "textDocument/publishDiagnostics" } , 20_000
@@ -163,7 +160,6 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
163160 3_000
164161
165162 wait_until_compiled ( server )
166- # end)
167163 end )
168164 end
169165
@@ -172,10 +168,7 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
172168 in_fixture ( __DIR__ , "dialyzer" , fn ->
173169 file_a = SourceFile.Path . to_uri ( Path . absname ( "lib/a.ex" ) )
174170
175- # capture_log(fn ->
176- IO . warn ( "init" )
177171 initialize ( server , % { "dialyzerEnabled" => true , "dialyzerFormat" => "dialyxir_long" } )
178- IO . warn ( "init done" )
179172
180173 message = assert_receive % { "method" => "textDocument/publishDiagnostics" } , 20000
181174
@@ -213,7 +206,6 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
213206 """
214207
215208 wait_until_compiled ( server )
216- # end)
217209 end )
218210 end
219211
@@ -222,7 +214,6 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
222214 in_fixture ( __DIR__ , "dialyzer" , fn ->
223215 file_a = SourceFile.Path . to_uri ( Path . absname ( "lib/a.ex" ) )
224216
225- # capture_log(fn ->
226217 initialize ( server , % { "dialyzerEnabled" => true , "dialyzerFormat" => "dialyxir_short" } )
227218
228219 message = assert_receive % { "method" => "textDocument/publishDiagnostics" } , 20000
@@ -251,7 +242,6 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
251242 assert error_message1 == "Function fun/0 has no local return."
252243 assert error_message2 == "The pattern can never match the type :error."
253244 wait_until_compiled ( server )
254- # end)
255245 end )
256246 end
257247
@@ -260,7 +250,6 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
260250 in_fixture ( __DIR__ , "dialyzer" , fn ->
261251 file_a = SourceFile.Path . to_uri ( Path . absname ( "lib/a.ex" ) )
262252
263- # capture_log(fn ->
264253 initialize ( server , % { "dialyzerEnabled" => true , "dialyzerFormat" => "dialyzer" } )
265254
266255 message = assert_receive % { "method" => "textDocument/publishDiagnostics" } , 20000
@@ -288,9 +277,8 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
288277
289278 assert error_message1 == "Function 'fun'/0 has no local return"
290279
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
292281 wait_until_compiled ( server )
293- # end)
294282 end )
295283 end
296284
@@ -299,7 +287,6 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
299287 in_fixture ( __DIR__ , "umbrella_dialyzer" , fn ->
300288 file_a = SourceFile.Path . to_uri ( Path . absname ( "apps/app1/lib/app1.ex" ) )
301289
302- # capture_log(fn ->
303290 initialize ( server , % { "dialyzerEnabled" => true , "dialyzerFormat" => "dialyxir_short" } )
304291
305292 message = assert_receive % { "method" => "textDocument/publishDiagnostics" } , 20000
@@ -328,15 +315,13 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
328315 assert error_message1 == "Function check_error/0 has no local return."
329316 assert error_message2 == "The pattern can never match the type :error."
330317 wait_until_compiled ( server )
331- # end)
332318 end )
333319 end
334320
335321 test "clears diagnostics when source files are deleted" , % { server: server } do
336322 in_fixture ( __DIR__ , "dialyzer" , fn ->
337323 file_a = SourceFile.Path . to_uri ( Path . absname ( "lib/a.ex" ) )
338324
339- # capture_log(fn ->
340325 initialize ( server , % { "dialyzerEnabled" => true } )
341326
342327 assert_receive publish_diagnostics_notif ( ^ file_a , [ _ , _ ] ) , 20000
@@ -346,7 +331,6 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
346331 Server . receive_packet ( server , did_change_watched_files ( [ % { "uri" => file_a , "type" => 3 } ] ) )
347332 assert_receive publish_diagnostics_notif ( ^ file_a , [ ] ) , 20000
348333 wait_until_compiled ( server )
349- # end)
350334 end )
351335 end
352336
@@ -422,7 +406,6 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
422406 in_fixture ( __DIR__ , "dialyzer" , fn ->
423407 file_c = SourceFile.Path . to_uri ( Path . absname ( "lib/c.ex" ) )
424408
425- # capture_log(fn ->
426409 initialize ( server , % {
427410 "dialyzerEnabled" => true ,
428411 "dialyzerFormat" => "dialyxir_long" ,
@@ -447,7 +430,6 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
447430
448431 assert response ( 3 , [ ] ) == resp
449432 wait_until_compiled ( server )
450- # end)
451433 end )
452434 end
453435
@@ -456,7 +438,6 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
456438 in_fixture ( __DIR__ , "dialyzer" , fn ->
457439 file_c = SourceFile.Path . to_uri ( Path . absname ( "lib/c.ex" ) )
458440
459- # capture_log(fn ->
460441 initialize ( server , % {
461442 "dialyzerEnabled" => true ,
462443 "dialyzerFormat" => "dialyxir_long" ,
@@ -533,7 +514,6 @@ defmodule ElixirLS.LanguageServer.DialyzerTest do
533514
534515 assert_receive ( % { "id" => 4 , "result" => nil } , 5000 )
535516 wait_until_compiled ( server )
536- # end)
537517 end )
538518 end
539519end
0 commit comments