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/).
7878
7979### Fixed
8080
81+ - Fixed GFortran version regex to allow for semver + build metadata
82+ ([ #813 ] ( https://github.com/fortran-lang/vscode-fortran-support/issues/813 ) )
8183- Fixed broken badges and replaced them with shields.io
8284 ([[ #815 ] ( https://github.com/fortran-lang/vscode-fortran-support/issues/815 )] )
8385- 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 {
9999 // seemed to optimise away the stdout and regex would return null
100100 // The words between the parenthesis can have all sorts of special characters
101101 // 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;
103103 const output = child . stdout . toString ( ) ;
104104 const match = regex . exec ( output ) ;
105105 const version = match ? match . groups . version : undefined ;
@@ -108,9 +108,9 @@ export class LinterSettings {
108108 this . logger . info ( `[lint] Found GNU Fortran version ${ version } ` ) ;
109109 this . logger . debug ( `[lint] Using Modern GNU Fortran diagnostics: ${ this . modernGNU } ` ) ;
110110 return version ;
111- } else {
112- this . logger . error ( `[lint] invalid compiler version extracted ${ version } from ${ output } ` ) ;
113111 }
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` ) ;
114114 }
115115
116116 public get version ( ) : string {
You can’t perform that action at this time.
0 commit comments