File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 22
33import * as path from 'path'
44import * as cp from 'child_process'
5- import { getIncludeParams , LANGUAGE_ID } from '../lib/helper'
5+ import { FORTRAN_DOCUMENT_SELECTOR , getIncludeParams } from '../lib/helper'
66
77import * as vscode from 'vscode'
88import { LoggingService } from '../services/logging-service'
99
1010export default class FortranLintingProvider {
11- constructor ( private loggingService : LoggingService ) { }
11+ constructor ( private loggingService : LoggingService ) { }
1212
1313 private diagnosticCollection : vscode . DiagnosticCollection
1414
1515 private doModernFortranLint ( textDocument : vscode . TextDocument ) {
1616 const errorRegex : RegExp =
1717 / ^ ( [ a - z A - Z ] : \\ ) * ( [ ^ : ] * ) : ( [ 0 - 9 ] + ) : ( [ 0 - 9 ] + ) : \s + ( .* ) \s + .* ?\s + ( E r r o r | W a r n i n g | F a t a l E r r o r ) : \s ( .* ) $ / gm
1818
19+ // Only lint Fortran (free, fixed) format files
1920 if (
20- textDocument . languageId !== LANGUAGE_ID ||
21- textDocument . uri . scheme !== 'file'
21+ FORTRAN_DOCUMENT_SELECTOR . some ( ( element ) => { element . language !== textDocument . languageId } ) ||
22+ FORTRAN_DOCUMENT_SELECTOR . some ( ( element ) => { element . scheme !== textDocument . uri . scheme } )
2223 ) {
2324 return
2425 }
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ import { LoggingService } from '../services/logging-service';
77// IMPORTANT: this should match the value
88// on the package.json otherwise the extension won't
99// work at all
10- export const LANGUAGE_ID = 'FortranFreeForm' ;
1110export const FORTRAN_DOCUMENT_SELECTOR = [
1211 { scheme : 'file' , language : 'FortranFreeForm' } ,
1312 { scheme : 'file' , language : 'FortranFixedForm' }
You can’t perform that action at this time.
0 commit comments