File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import * as path from 'path'
4
4
import * as cp from 'child_process'
5
- import { getIncludeParams , LANGUAGE_ID } from '../lib/helper'
5
+ import { FORTRAN_DOCUMENT_SELECTOR , getIncludeParams } from '../lib/helper'
6
6
7
7
import * as vscode from 'vscode'
8
8
import { LoggingService } from '../services/logging-service'
9
9
10
10
export default class FortranLintingProvider {
11
- constructor ( private loggingService : LoggingService ) { }
11
+ constructor ( private loggingService : LoggingService ) { }
12
12
13
13
private diagnosticCollection : vscode . DiagnosticCollection
14
14
15
15
private doModernFortranLint ( textDocument : vscode . TextDocument ) {
16
16
const errorRegex : RegExp =
17
17
/ ^ ( [ 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
18
18
19
+ // Only lint Fortran (free, fixed) format files
19
20
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 } )
22
23
) {
23
24
return
24
25
}
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ import { LoggingService } from '../services/logging-service';
7
7
// IMPORTANT: this should match the value
8
8
// on the package.json otherwise the extension won't
9
9
// work at all
10
- export const LANGUAGE_ID = 'FortranFreeForm' ;
11
10
export const FORTRAN_DOCUMENT_SELECTOR = [
12
11
{ scheme : 'file' , language : 'FortranFreeForm' } ,
13
12
{ scheme : 'file' , language : 'FortranFixedForm' }
You can’t perform that action at this time.
0 commit comments