[gnome-builder] build-pipeline: add underscore to filename in error format regex
- From: Sébastien Lafargue <slafargue src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] build-pipeline: add underscore to filename in error format regex
- Date: Thu, 3 Aug 2017 18:00:50 +0000 (UTC)
commit 793e284d35e91167eabe23f33b96377e0ab18dd8
Author: Xiang Fan <sfanxiang gmail com>
Date: Thu Aug 3 00:34:17 2017 -0500
build-pipeline: add underscore to filename in error format regex
This allows the regex to match source files with underscore. Otherwise
source files such as "a_b.c" would be recognized as "b.c" in the build
panel.
https://bugzilla.gnome.org/show_bug.cgi?id=785756
libide/buildsystem/ide-build-pipeline.c | 2 +-
plugins/gcc/gbp-gcc-pipeline-addin.c | 10 +++++-----
plugins/mono/mono_plugin.py | 2 +-
plugins/vala-pack/ide-vala-pipeline-addin.vala | 2 +-
4 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/libide/buildsystem/ide-build-pipeline.c b/libide/buildsystem/ide-build-pipeline.c
index 38086b0..649389f 100644
--- a/libide/buildsystem/ide-build-pipeline.c
+++ b/libide/buildsystem/ide-build-pipeline.c
@@ -2146,7 +2146,7 @@ ide_build_pipeline_emit_diagnostic (IdeBuildPipeline *self,
* For example, to extract warnings from GCC you might do something
* like the following:
*
- * "(?<filename>[a-zA-Z0-9\\-\\.\\/]+):"
+ * "(?<filename>[a-zA-Z0-9\\-\\.\\/_]+):"
* "(?<line>\\d+):"
* "(?<column>\\d+): "
* "(?<level>[\\w\\s]+): "
diff --git a/plugins/gcc/gbp-gcc-pipeline-addin.c b/plugins/gcc/gbp-gcc-pipeline-addin.c
index d73b68f..3f8a913 100644
--- a/plugins/gcc/gbp-gcc-pipeline-addin.c
+++ b/plugins/gcc/gbp-gcc-pipeline-addin.c
@@ -20,11 +20,11 @@
#include "gbp-gcc-pipeline-addin.h"
-#define ERROR_FORMAT_REGEX \
- "(?<filename>[a-zA-Z0-9\\-\\.\\/]+):" \
- "(?<line>\\d+):" \
- "(?<column>\\d+): " \
- "(?<level>[\\w\\s]+): " \
+#define ERROR_FORMAT_REGEX \
+ "(?<filename>[a-zA-Z0-9\\-\\.\\/_]+):" \
+ "(?<line>\\d+):" \
+ "(?<column>\\d+): " \
+ "(?<level>[\\w\\s]+): " \
"(?<message>.*)"
struct _GbpGccPipelineAddin
diff --git a/plugins/mono/mono_plugin.py b/plugins/mono/mono_plugin.py
index d05db62..1b9843d 100644
--- a/plugins/mono/mono_plugin.py
+++ b/plugins/mono/mono_plugin.py
@@ -5,7 +5,7 @@ import gi
from gi.repository import Ide
from gi.repository import GLib
-_ERROR_REGEX = ("(?<filename>[a-zA-Z0-9\\-\\.\\/]+.cs)" +
+_ERROR_REGEX = ("(?<filename>[a-zA-Z0-9\\-\\.\\/_]+.cs)" +
"\\((?<line>\\d+),(?<column>\\d+)\\): " +
"(?<level>[\\w\\s]+) " +
"(?<code>CS[0-9]+): " +
diff --git a/plugins/vala-pack/ide-vala-pipeline-addin.vala b/plugins/vala-pack/ide-vala-pipeline-addin.vala
index 3626ca6..2b84f82 100644
--- a/plugins/vala-pack/ide-vala-pipeline-addin.vala
+++ b/plugins/vala-pack/ide-vala-pipeline-addin.vala
@@ -27,7 +27,7 @@ namespace Ide
{
// main.vala:24.30-24.30: error: initializer list used for `Gtk.WindowType', which is neither
array nor struct
const string ERROR_FORMAT_REGEX =
- "(?<filename>[a-zA-Z0-9\\-\\.\\/]+.vala):" +
+ "(?<filename>[a-zA-Z0-9\\-\\.\\/_]+.vala):" +
"(?<line>\\d+).(?<column>\\d+)-(?<line2>\\d+).(?<column2>\\d+): " +
"(?<level>[\\w\\s]+): " +
"(?<message>.*)";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]