Update diagnostic message according to standard tool parsing. (#151)

MSBuild and many other tools / IDEs will correctly parse the message if ":" is added right after the error code.

See https://blogs.msdn.microsoft.com/msbuild/2006/11/02/msbuild-visual-studio-aware-error-messages-and-message-formats/ for reference.
This commit is contained in:
Warren Seine 2019-05-17 21:22:53 +02:00 committed by Eugene Zolenko
parent 1c3a093bcb
commit 5b629f17e8

View File

@ -38,9 +38,9 @@ export function printDiagnostics(context: IContext, diagnostics: IDiagnostics[],
else
{
if (diagnostic.fileLine !== undefined)
print.call(context, `${diagnostic.fileLine}: ${type}${category} TS${diagnostic.code} ${color(diagnostic.flatMessage)}`);
print.call(context, `${diagnostic.fileLine}: ${type}${category} TS${diagnostic.code}: ${color(diagnostic.flatMessage)}`);
else
print.call(context, `${type}${category} TS${diagnostic.code} ${color(diagnostic.flatMessage)}`);
print.call(context, `${type}${category} TS${diagnostic.code}: ${color(diagnostic.flatMessage)}`);
}
});
}