Skip to content

Commit 8eb523a

Browse files
committed
refactor: use isFortran function
1 parent 32acba4 commit 8eb523a

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/features/linter-provider.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ import { Logger } from '../services/logging';
1010
import { GNULinter, GNUModernLinter, IntelLinter, LFortranLinter, NAGLinter } from '../lib/linters';
1111
import {
1212
EXTENSION_ID,
13-
FortranDocumentSelector,
1413
resolveVariables,
1514
promptForMissingTool,
1615
isFreeForm,
1716
spawnAsPromise,
17+
isFortran,
1818
} from '../lib/tools';
1919
import { arraysEqual } from '../lib/helper';
2020
import { RescanLint } from './commands';
@@ -194,12 +194,7 @@ export class FortranLintingProvider {
194194
// Only lint if a compiler is specified
195195
if (!this.settings.enabled) return;
196196
// Only lint Fortran (free, fixed) format files
197-
if (
198-
!FortranDocumentSelector().some(e => e.scheme === textDocument.uri.scheme) ||
199-
!FortranDocumentSelector().some(e => e.language === textDocument.languageId)
200-
) {
201-
return;
202-
}
197+
if (!isFortran(textDocument)) return;
203198

204199
this.linter = this.getLinter(this.settings.compiler);
205200
const command = this.getLinterExecutable();

0 commit comments

Comments
 (0)