File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
7474
7575### Fixed
7676
77+ - Fixed regular expression for parsing version of GFortran in linter
78+ ([ #759 ] ( https://github.com/fortran-lang/vscode-fortran-support/issues/759 ) )
7779- Fixed bug where diagnostic messages would linger from the previous state
7880 ([ #706 ] ( https://github.com/fortran-lang/vscode-fortran-support/issues/706 ) )
7981- Fixed activation bug on Windows causing the persistent cache to fail
Original file line number Diff line number Diff line change @@ -97,7 +97,9 @@ export class LinterSettings {
9797 }
9898 // State the variables explicitly bc the TypeScript compiler on the CI
9999 // seemed to optimise away the stdout and regex would return null
100- const regex = / ^ G N U F o r t r a n \( [ \w . - ] + \) (?< version > .* ) $ / gm;
100+ // The words between the parenthesis can have all sorts of special characters
101+ // account for all of them just to be safe
102+ const regex = / ^ G N U F o r t r a n \( [ \S ] + \) (?< version > .* ) $ / gm;
101103 const output = child . stdout . toString ( ) ;
102104 const match = regex . exec ( output ) ;
103105 const version = match ? match . groups . version : undefined ;
@@ -107,7 +109,7 @@ export class LinterSettings {
107109 this . logger . debug ( `[lint] Using Modern GNU Fortran diagnostics: ${ this . modernGNU } ` ) ;
108110 return version ;
109111 } else {
110- this . logger . error ( `[lint] invalid compiler version: ${ version } ` ) ;
112+ this . logger . error ( `[lint] invalid compiler version extracted ${ version } from ${ output } ` ) ;
111113 }
112114 }
113115
You can’t perform that action at this time.
0 commit comments