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/).
74
74
75
75
### Fixed
76
76
77
+ - Fixed regular expression for parsing version of GFortran in linter
78
+ ([ #759 ] ( https://github.com/fortran-lang/vscode-fortran-support/issues/759 ) )
77
79
- Fixed bug where diagnostic messages would linger from the previous state
78
80
([ #706 ] ( https://github.com/fortran-lang/vscode-fortran-support/issues/706 ) )
79
81
- 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 {
97
97
}
98
98
// State the variables explicitly bc the TypeScript compiler on the CI
99
99
// 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;
101
103
const output = child . stdout . toString ( ) ;
102
104
const match = regex . exec ( output ) ;
103
105
const version = match ? match . groups . version : undefined ;
@@ -107,7 +109,7 @@ export class LinterSettings {
107
109
this . logger . debug ( `[lint] Using Modern GNU Fortran diagnostics: ${ this . modernGNU } ` ) ;
108
110
return version ;
109
111
} else {
110
- this . logger . error ( `[lint] invalid compiler version: ${ version } ` ) ;
112
+ this . logger . error ( `[lint] invalid compiler version extracted ${ version } from ${ output } ` ) ;
111
113
}
112
114
}
113
115
You can’t perform that action at this time.
0 commit comments