Commit fd6c1292 authored by Jon Skeet's avatar Jon Skeet

Munge protoc's error format into a VS-C#-compatible output format.

Fixes issue 86.
parent 566607e0
......@@ -215,6 +215,11 @@ namespace Google.ProtocolBuffers.ProtoGen
tmp = process.StandardError.ReadToEnd();
if (tmp.Trim().Length > 0)
{
// Replace protoc output with something more amenable to Visual Studio.
var regexMsvs = new Regex(@"(.*)\((\d+)\).* column=(\d+)\s*:\s*(.*)");
tmp = regexMsvs.Replace(tmp, "$1($2,$3): error CS9999: $4");
var regexGcc = new Regex(@"(.*):(\d+):(\d+):\s*(.*)");
tmp = regexGcc.Replace(tmp, "$1($2,$3): error CS9999: $4");
Console.Error.WriteLine(tmp);
}
return process.ExitCode;
......
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