Commit 228e8580 authored by Adam Dingle's avatar Adam Dingle

[externaltools] Recognize links in sbt output

https://bugzilla.gnome.org/show_bug.cgi?id=736745
parent 422748b2
......@@ -166,9 +166,11 @@ class RegexpLinkParser(AbstractLinkParser):
# javac 'Test.java:13: ...'
# ruby 'test.rb:5: ...'
# scalac 'Test.scala:5: ...'
# sbt (scala) '[error] test.scala:4: ...'
# 6g (go) 'test.go:9: ...'
REGEXP_STANDARD = r"""
^
(?:\[(?:error|warn)\]\ )?
(?P<lnk>
(?P<pth> [^ \:\n]* )
\:
......
......@@ -157,6 +157,14 @@ test.rb:5: undefined method `fake_method' for main:Object (NoMethodError)
self.assert_link(lnk, "Test.scala", 7)
self.assert_link_text(line, lnk, 'Test.scala:7')
def test_parse_sbt_one_line(self):
line = "[error] /home/hank/foo/Test.scala:7: not found: value fakeMethod"
links = self.p.parse(line)
self.assert_link_count(links, 1)
lnk = links[0]
self.assert_link(lnk, "/home/hank/foo/Test.scala", 7)
self.assert_link_text(line, lnk, '/home/hank/foo/Test.scala:7')
def test_parse_go_6g_one_line(self):
line = "test.go:9: undefined: FakeMethod"
links = self.p.parse(line)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment