@@ -405,13 +405,7 @@ It returns the number of bytes written and any write error encountered.
405
405
await testHoverProvider ( config , testCases ) ;
406
406
} ) ;
407
407
408
- test ( 'Linting - concurrent process cancelation' , async function ( ) {
409
- if ( ! goVersion . lt ( '1.18' ) ) {
410
- // TODO(hyangah): reenable test when staticcheck for go1.18 is released
411
- // https://github.com/dominikh/go-tools/issues/1145
412
- this . skip ( ) ;
413
- }
414
-
408
+ test ( 'Linting - concurrent process cancelation' , async ( ) => {
415
409
const util = require ( '../../src/util' ) ;
416
410
const processutil = require ( '../../src/utils/processUtils' ) ;
417
411
sinon . spy ( util , 'runTool' ) ;
@@ -440,12 +434,7 @@ It returns the number of bytes written and any write error encountered.
440
434
) ;
441
435
} ) ;
442
436
443
- test ( 'Linting - lint errors with multiple open files' , async function ( ) {
444
- if ( ! goVersion . lt ( '1.18' ) ) {
445
- // TODO(hyangah): reenable test when staticcheck for go1.18 is released
446
- // https://github.com/dominikh/go-tools/issues/1145
447
- this . skip ( ) ;
448
- }
437
+ test ( 'Linting - lint errors with multiple open files' , async ( ) => {
449
438
// handleDiagnosticErrors may adjust the lint errors' ranges to make the error more visible.
450
439
// This adjustment applies only to the text documents known to vscode. This test checks
451
440
// the adjustment is made consistently across multiple open text documents.
@@ -482,13 +471,7 @@ It returns the number of bytes written and any write error encountered.
482
471
assert . deepStrictEqual ( file1Diagnostics [ 0 ] , file2Diagnostics [ 0 ] ) ;
483
472
} ) ;
484
473
485
- test ( 'Error checking' , async function ( ) {
486
- if ( ! goVersion . lt ( '1.18' ) ) {
487
- // TODO(hyangah): reenable test when staticcheck for go1.18 is released
488
- // https://github.com/dominikh/go-tools/issues/1145
489
- this . skip ( ) ;
490
- }
491
-
474
+ test ( 'Error checking' , async ( ) => {
492
475
const config = Object . create ( getGoConfig ( ) , {
493
476
vetOnSave : { value : 'package' } ,
494
477
vetFlags : { value : [ '-all' ] } ,
@@ -515,7 +498,15 @@ It returns the number of bytes written and any write error encountered.
515
498
516
499
// `check` itself doesn't run deDupeDiagnostics, so we expect all vet/lint errors.
517
500
const expected = [ ...expectedLintErrors , ...expectedBuildVetErrors ] ;
518
- const diagnostics = await check ( { } , vscode . Uri . file ( path . join ( fixturePath , 'errorsTest' , 'errors.go' ) ) , config ) ;
501
+ const diagnostics = await check (
502
+ {
503
+ buildDiagnosticCollection : vscode . languages . createDiagnosticCollection ( 'buildtest' ) ,
504
+ lintDiagnosticCollection : vscode . languages . createDiagnosticCollection ( 'linttest' ) ,
505
+ vetDiagnosticCollection : vscode . languages . createDiagnosticCollection ( 'vettest' )
506
+ } ,
507
+ vscode . Uri . file ( path . join ( fixturePath , 'errorsTest' , 'errors.go' ) ) ,
508
+ config
509
+ ) ;
519
510
const sortedDiagnostics = ( [ ] as ICheckResult [ ] ) . concat
520
511
. apply (
521
512
[ ] ,
0 commit comments