Skip to content

Commit

Permalink
Merge pull request #30 from mandeep/new-error-format-fix
Browse files Browse the repository at this point in the history
Updated regex for new error format
  • Loading branch information
oschwald committed Mar 18, 2017
2 parents 6540300 + b9b3a60 commit 72dbe46
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,16 @@ class Rust(Linter):
'use-crate-root': False,
'crate-root': None,
}
cmd = ['rustc', '-Zno-trans']
cmd = ['rustc']
syntax = 'rust'
tempfile_suffix = 'rs'

regex = (r'^(?P<file>.+?):(?P<line>\d+):(?P<col>\d+):\s+\d+:\d+\s'
r'(?:(?P<error>(error|fatal error))|(?P<warning>warning)):\s+'
r'(?P<message>.+)')
regex = r'''(?xi)
^(?:(?P<error>(error|fatal error))|(?P<warning>warning)).*?:\s+(?P<message>.+)\s*\r?
-->\s+(?P<file>.+?):(?P<line>\d+):(?P<col>\d+)$
'''

multiline = True
use_cargo = False
use_cargo_check = False
use_crate_root = False
Expand Down

0 comments on commit 72dbe46

Please sign in to comment.