@@ -21,10 +21,13 @@ import {
21
21
LFortranLinter ,
22
22
} from '../src/lib/linters' ;
23
23
import { 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 ) ;
24
27
25
28
suite ( 'Linter integration' , ( ) => {
26
29
let doc : TextDocument ;
27
- const linter = new FortranLintingProvider ( ) ;
30
+ const linter = new FortranLintingProvider ( logger ) ;
28
31
const fileUri = Uri . file ( path . resolve ( __dirname , '../../test/fortran/lint/test1.f90' ) ) ;
29
32
const root = path . resolve ( __dirname , '../../test/fortran/' ) ;
30
33
const config = workspace . getConfiguration ( EXTENSION_ID ) ;
@@ -37,7 +40,7 @@ suite('Linter integration', () => {
37
40
// different versions of gfortran report the error at a different column number
38
41
// need to implement a the compiler versioning see #523
39
42
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 ) ;
41
44
const ref : Diagnostic [ ] = [
42
45
new Diagnostic (
43
46
new Range ( new Position ( 21 - 1 , 18 - 1 ) , new Position ( 21 - 1 , 18 - 1 ) ) ,
@@ -123,7 +126,7 @@ suite('fypp Linter integration', () => {
123
126
const doc = await workspace . openTextDocument ( fileUri ) ;
124
127
await window . showTextDocument ( doc ) ;
125
128
126
- const diags = await new FortranLintingProvider ( ) [ 'doLint' ] ( doc ) ;
129
+ const diags = await new FortranLintingProvider ( logger ) [ 'doLint' ] ( doc ) ;
127
130
const refs : Diagnostic [ ] = [
128
131
new Diagnostic (
129
132
new Range ( new Position ( 18 , 35 ) , new Position ( 18 , 35 ) ) ,
0 commit comments