@@ -405,13 +405,7 @@ It returns the number of bytes written and any write error encountered.
405405 await testHoverProvider ( config , testCases ) ;
406406 } ) ;
407407
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 ( ) => {
415409 const util = require ( '../../src/util' ) ;
416410 const processutil = require ( '../../src/utils/processUtils' ) ;
417411 sinon . spy ( util , 'runTool' ) ;
@@ -440,12 +434,7 @@ It returns the number of bytes written and any write error encountered.
440434 ) ;
441435 } ) ;
442436
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 ( ) => {
449438 // handleDiagnosticErrors may adjust the lint errors' ranges to make the error more visible.
450439 // This adjustment applies only to the text documents known to vscode. This test checks
451440 // 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.
482471 assert . deepStrictEqual ( file1Diagnostics [ 0 ] , file2Diagnostics [ 0 ] ) ;
483472 } ) ;
484473
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 ( ) => {
492475 const config = Object . create ( getGoConfig ( ) , {
493476 vetOnSave : { value : 'package' } ,
494477 vetFlags : { value : [ '-all' ] } ,
@@ -515,7 +498,15 @@ It returns the number of bytes written and any write error encountered.
515498
516499 // `check` itself doesn't run deDupeDiagnostics, so we expect all vet/lint errors.
517500 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+ ) ;
519510 const sortedDiagnostics = ( [ ] as ICheckResult [ ] ) . concat
520511 . apply (
521512 [ ] ,
0 commit comments