Skip to content

Commit 215ebf8

Browse files
committed
[BUG] linter.modOutput not working for Intel compilers
Fixes #538
1 parent 7cc3d05 commit 215ebf8

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1919
- Changed Free and Fixed Form language aliases. `Fortran` is now associated with `FortranFreeForm`
2020
([#536](https://github.com/fortran-lang/vscode-fortran-support/issues/536))
2121

22+
### Fixed
23+
24+
- Fixed `linter.modOutput` not working with Intel Fortran Compilers
25+
([#538](https://github.com/fortran-lang/vscode-fortran-support/issues/538))
26+
2227
## [3.1.0]
2328

2429
### Changed

src/features/linter-provider.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export class FortranLintingProvider {
122122
const args = [
123123
...this.getMandatoryLinterArgs(this.compiler),
124124
...this.getLinterExtraArgs(this.compiler),
125-
this.getModOutputDir(this.compiler),
125+
...this.getModOutputDir(this.compiler),
126126
];
127127
const includePaths = this.getIncludePaths();
128128

@@ -138,25 +138,25 @@ export class FortranLintingProvider {
138138
return argList.map(arg => arg.trim()).filter(arg => arg !== '');
139139
}
140140

141-
private getModOutputDir(compiler: string): string {
141+
private getModOutputDir(compiler: string): string[] {
142142
const config = vscode.workspace.getConfiguration('fortran');
143143
let modout: string = config.get('linter.modOutput', '');
144144
let modFlag = '-J';
145145
switch (compiler) {
146146
case 'ifx':
147147
case 'ifort':
148-
modFlag = '-module ';
148+
modFlag = '-module';
149149
break;
150150

151151
default:
152152
modFlag = '-J';
153153
break;
154154
}
155155
if (modout) {
156-
modout = modFlag + resolveVariables(modout);
157-
this.logger.logInfo(`Linter.moduleOutput: ${modout}`);
156+
modout = resolveVariables(modout);
157+
this.logger.logInfo(`Linter.moduleOutput: ${modFlag} ${modout}`);
158158
}
159-
return modout;
159+
return [modFlag, modout];
160160
}
161161

162162
/**

0 commit comments

Comments
 (0)