File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -279,7 +279,7 @@ export class FortranLintingProvider {
279
279
const textDocument = textEditor . document ;
280
280
this . linter = this . getLinter ( this . settings . compiler ) ;
281
281
const command = this . getLinterExecutable ( ) ;
282
- let argList = this . constructArgumentList ( textDocument ) ;
282
+ let argList = [ ... this . constructArgumentList ( textDocument ) ] ;
283
283
// Remove mandatory linter args, used for mock compilation
284
284
argList = argList . filter ( arg => ! this . linter . args . includes ( arg ) ) ;
285
285
if ( debug ) argList . push ( '-g' ) ; // add debug symbols flag, same for all compilers
@@ -417,7 +417,8 @@ export class FortranLintingProvider {
417
417
*/
418
418
private getLinterExtraArgs ( ) : string [ ] {
419
419
const config = vscode . workspace . getConfiguration ( EXTENSION_ID ) ;
420
- let args : string [ ] = this . linter . argsDefault ;
420
+ // Get the linter arguments from the settings via a deep copy
421
+ let args : string [ ] = [ ...this . linter . argsDefault ] ;
421
422
const user_args : string [ ] = this . settings . args ;
422
423
// If we have specified linter.extraArgs then replace default arguments
423
424
if ( user_args . length > 0 ) args = user_args . slice ( ) ;
You can’t perform that action at this time.
0 commit comments