@@ -21,10 +21,13 @@ import {
2121 LFortranLinter ,
2222} from '../src/lib/linters' ;
2323import { EXTENSION_ID , pipInstall } from '../src/lib/tools' ;
24+ import { Logger , LogLevel } from '../src/services/logging' ;
25+
26+ const logger = new Logger ( window . createOutputChannel ( 'Modern Fortran' , 'log' ) , LogLevel . DEBUG ) ;
2427
2528suite ( 'Linter integration' , ( ) => {
2629 let doc : TextDocument ;
27- const linter = new FortranLintingProvider ( ) ;
30+ const linter = new FortranLintingProvider ( logger ) ;
2831 const fileUri = Uri . file ( path . resolve ( __dirname , '../../test/fortran/lint/test1.f90' ) ) ;
2932 const root = path . resolve ( __dirname , '../../test/fortran/' ) ;
3033 const config = workspace . getConfiguration ( EXTENSION_ID ) ;
@@ -37,7 +40,7 @@ suite('Linter integration', () => {
3740 // different versions of gfortran report the error at a different column number
3841 // need to implement a the compiler versioning see #523
3942 test ( 'GNU - API call to doLint produces correct diagnostics' , async ( ) => {
40- const diags = await new FortranLintingProvider ( ) [ 'doLint' ] ( doc ) ;
43+ const diags = await new FortranLintingProvider ( logger ) [ 'doLint' ] ( doc ) ;
4144 const ref : Diagnostic [ ] = [
4245 new Diagnostic (
4346 new Range ( new Position ( 21 - 1 , 18 - 1 ) , new Position ( 21 - 1 , 18 - 1 ) ) ,
@@ -123,7 +126,7 @@ suite('fypp Linter integration', () => {
123126 const doc = await workspace . openTextDocument ( fileUri ) ;
124127 await window . showTextDocument ( doc ) ;
125128
126- const diags = await new FortranLintingProvider ( ) [ 'doLint' ] ( doc ) ;
129+ const diags = await new FortranLintingProvider ( logger ) [ 'doLint' ] ( doc ) ;
127130 const refs : Diagnostic [ ] = [
128131 new Diagnostic (
129132 new Range ( new Position ( 18 , 35 ) , new Position ( 18 , 35 ) ) ,
0 commit comments