Skip to content

Commit

Permalink
linter modification in order to work with gcc 5.4.0 (Issue Nevensky#28,…
Browse files Browse the repository at this point in the history
… fixed by 8fdafs2 and Kailang)
  • Loading branch information
jm-cc committed Mar 9, 2017
1 parent 2ef0c56 commit fa22022
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ class GfortranFixedForm(Linter):
multiline = True
regex = (
# filename:line:col: is common for multiline and single line warnings
r'^[^:]*:(?P<line>\d+)[:.](?P<col>\d+):'
# Then we either have a space or (a newline, a newline, some source code, a newline, a col number, a newline)
r'(?:\s|$\r?\n^$\r?\n^.*$\r?\n^\s*\d$\r?\n)'
r'.*:(?P<line>\d+):(?P<col>\d+):'
# Then we either have a space or (a newline, a newline, some source code,
# a newline, a col number, a newline)
r'(?:(\s*.*\s*\d+\s*))'
# Finally we have (Error|Warning): message to the end of the line
r'(?:(?P<error>Error|Fatal\sError)|(?P<warning>Warning)): (?P<message>.*$)'
)
Expand All @@ -45,10 +46,11 @@ class GfortranModern(Linter):
multiline = True
regex = (
# filename:line:col: is common for multiline and single line warnings
r'^[^:]*:(?P<line>\d+)[:.](?P<col>\d+):'
# Then we either have a space or (a newline, a newline, some source code, a newline, a col number, a newline)
r'(?:\s|$\r?\n^$\r?\n^.*$\r?\n^\s*\d$\r?\n)'
r'.*:(?P<line>\d+):(?P<col>\d+):'
# Then we either have a space or (a newline, a newline, some source code,
# a newline, a col number, a newline)
r'(?:(\s*.*\s*\d+\s*))'
# Finally we have (Error|Warning): message to the end of the line
r'(?:(?P<error>Error|Fatal\sError)|(?P<warning>Warning)): (?P<message>.*$)'
r'(?P<error>(Error|Fatal Error)|(?P<warning>Warning)): (?P<message>.*)'
)
tempfile_suffix = "f90"

0 comments on commit fa22022

Please sign in to comment.