File tree Expand file tree Collapse file tree 4 files changed +13
-10
lines changed Expand file tree Collapse file tree 4 files changed +13
-10
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/).
3535
3636### Changed
3737
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 ) )
3840- Changed all instances of the publisher to ` fortran-lang `
3941 ([ #450 ] ( https://github.com/fortran-lang/vscode-fortran-support/issues/450 ) )
4042- Updated grammar unittests to include scope injections
Original file line number Diff line number Diff line change 22
33import * as path from 'path' ;
44import * as cp from 'child_process' ;
5+ import which from 'which' ;
56
67import * as vscode from 'vscode' ;
78import { LoggingService } from '../services/logging-service' ;
@@ -221,19 +222,17 @@ export class FortranLintingProvider {
221222 }
222223
223224 /**
224- * Returns the linter executable
225+ * Returns the linter executable i.e. this.compilerPath
225226 * @returns String with linter
226227 */
227228 private getLinterExecutable ( ) : string {
228229 const config = vscode . workspace . getConfiguration ( 'fortran.linter' ) ;
229230
230231 this . compiler = config . get < string > ( 'compiler' , 'gfortran' ) ;
231232 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 ;
237236 }
238237
239238 /**
Original file line number Diff line number Diff line change 1- import * as path from 'path' ;
2- import * as Mocha from 'mocha' ;
3- import * as glob from 'glob' ;
1+ import path from 'path' ;
2+ import Mocha from 'mocha' ;
3+ import glob from 'glob' ;
44
55export function run ( ) : Promise < void > {
66 // Create the mocha test
Original file line number Diff line number Diff line change 66 "lib" : [" ES2020" ],
77 "sourceMap" : true ,
88 "rootDir" : " ." ,
9- "resolveJsonModule" : true
9+ "resolveJsonModule" : true ,
10+ "esModuleInterop" : true ,
11+ "removeComments" : true
1012 },
1113 "include" : [" test/**/*.ts" , " syntaxes/*.json" ],
1214 "exclude" : [" node_modules" , " .vscode-test" ]
You can’t perform that action at this time.
0 commit comments