File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
35
35
36
36
### Changed
37
37
38
+ - Changed ` linter.compilerPath ` to use the full path to the compiler instead of the root
39
+ ([ #500 ] ( https://github.com/fortran-lang/vscode-fortran-support/issues/500 ) )
38
40
- Changed all instances of the publisher to ` fortran-lang `
39
41
([ #450 ] ( https://github.com/fortran-lang/vscode-fortran-support/issues/450 ) )
40
42
- Updated grammar unittests to include scope injections
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 which from 'which' ;
5
6
6
7
import * as vscode from 'vscode' ;
7
8
import { LoggingService } from '../services/logging-service' ;
@@ -221,19 +222,17 @@ export class FortranLintingProvider {
221
222
}
222
223
223
224
/**
224
- * Returns the linter executable
225
+ * Returns the linter executable i.e. this.compilerPath
225
226
* @returns String with linter
226
227
*/
227
228
private getLinterExecutable ( ) : string {
228
229
const config = vscode . workspace . getConfiguration ( 'fortran.linter' ) ;
229
230
230
231
this . compiler = config . get < string > ( 'compiler' , 'gfortran' ) ;
231
232
this . compilerPath = config . get < string > ( 'compilerPath' , '' ) ;
232
- const linter = path . join ( this . compilerPath , this . compiler ) ;
233
-
234
- this . logger . logInfo ( `using linter: ${ this . compiler } located in: ${ linter } ` ) ;
235
-
236
- return linter ;
233
+ if ( this . compilerPath === '' ) this . compilerPath = which . sync ( this . compiler ) ;
234
+ this . logger . logInfo ( `using linter: ${ this . compiler } located in: ${ this . compilerPath } ` ) ;
235
+ return this . compilerPath ;
237
236
}
238
237
239
238
/**
You can’t perform that action at this time.
0 commit comments