[gedit/gnome-3-10] [externaltools] Recognize links in sbt output
- From: Adam Dingle <adamd src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/gnome-3-10] [externaltools] Recognize links in sbt output
- Date: Tue, 16 Sep 2014 18:37:46 +0000 (UTC)
commit 2805e933b2a54128819f19b9461ae0e5a5e5c24e
Author: Adam Dingle <adam medovina org>
Date: Tue Sep 16 09:39:06 2014 -0400
[externaltools] Recognize links in sbt output
https://bugzilla.gnome.org/show_bug.cgi?id=736745
plugins/externaltools/tools/linkparsing.py | 2 ++
plugins/externaltools/tools/linkparsing_test.py | 8 ++++++++
2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/plugins/externaltools/tools/linkparsing.py b/plugins/externaltools/tools/linkparsing.py
index 77f9c67..7dc8da7 100644
--- a/plugins/externaltools/tools/linkparsing.py
+++ b/plugins/externaltools/tools/linkparsing.py
@@ -162,9 +162,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]* )
\:
diff --git a/plugins/externaltools/tools/linkparsing_test.py b/plugins/externaltools/tools/linkparsing_test.py
index 187a2f8..ebd7b7a 100644
--- a/plugins/externaltools/tools/linkparsing_test.py
+++ b/plugins/externaltools/tools/linkparsing_test.py
@@ -156,6 +156,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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]