Skip to content

Commit

Permalink
Update diagnostic message according to standard tool parsing. (#151)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
warrenseine authored and ezolenko committed May 17, 2019
1 parent 1c3a093 commit 5b629f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/print-diagnostics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)}`);
}
});
}

0 comments on commit 5b629f1

Please sign in to comment.