File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
78
78
79
79
### Fixed
80
80
81
+ - Fixed GFortran version regex to allow for semver + build metadata
82
+ ([ #813 ] ( https://github.com/fortran-lang/vscode-fortran-support/issues/813 ) )
81
83
- Fixed broken badges and replaced them with shields.io
82
84
([[ #815 ] ( https://github.com/fortran-lang/vscode-fortran-support/issues/815 )] )
83
85
- Fixed regular expression for parsing version of GFortran in linter
Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ export class LinterSettings {
99
99
// seemed to optimise away the stdout and regex would return null
100
100
// The words between the parenthesis can have all sorts of special characters
101
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;
102
+ const regex = / ^ G N U F o r t r a n \( [ \S ] + \) (?< msg > (?< version > \d + \. \d + \. \d + ) .* ) $ / gm;
103
103
const output = child . stdout . toString ( ) ;
104
104
const match = regex . exec ( output ) ;
105
105
const version = match ? match . groups . version : undefined ;
@@ -108,9 +108,9 @@ export class LinterSettings {
108
108
this . logger . info ( `[lint] Found GNU Fortran version ${ version } ` ) ;
109
109
this . logger . debug ( `[lint] Using Modern GNU Fortran diagnostics: ${ this . modernGNU } ` ) ;
110
110
return version ;
111
- } else {
112
- this . logger . error ( `[lint] invalid compiler version extracted ${ version } from ${ output } ` ) ;
113
111
}
112
+ this . logger . warn ( `[lint] Unable to extract semver version ${ match . groups . msg } from ${ output } ` ) ;
113
+ this . logger . warn ( `[lint] Using GFortran with fallback options` ) ;
114
114
}
115
115
116
116
public get version ( ) : string {
You can’t perform that action at this time.
0 commit comments