-
Notifications
You must be signed in to change notification settings - Fork 13k
Emit error codes when reporting diagnostics. #508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Addresses part of issue #506.
else { | ||
sys.write(diagnostic.messageText + sys.newLine); | ||
|
||
var output = diagnostic.file.filename + "(" + loc.line + "," + loc.character + "): "; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+=
👍 |
} | ||
|
||
var category = DiagnosticCategory[diagnostic.category]; | ||
output += category + " TS" + diagnostic.code + ": " + diagnostic.messageText + sys.newLine; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does 'category' need to be localized?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not checkin this change without change to https://github.com/Microsoft/TypeScript/blob/printDiagnosticCodes/src/harness/harness.ts#L776 Also I would recommend making the changes to https://github.com/Microsoft/TypeScript/blob/printDiagnosticCodes/src/harness/harness.ts#L791 such that it calls minimalDiagnosticsToString here itself instead of from runners (eg: https://github.com/Microsoft/TypeScript/blob/printDiagnosticCodes/src/harness/rwcRunner.ts#L155 and https://github.com/Microsoft/TypeScript/blob/printDiagnosticCodes/src/harness/projectsRunner.ts#L302) |
👍 |
@sheetalkamat I made the change to |
I would either do compilerrunner change as a separate iteration of this same pull request (I prefer that) or create a separate pull request for the same, But given that now we are showing error codes in error that change should be done sooner than later. |
Will do. I'll start working on it. Thanks! |
Emit error codes when reporting diagnostics.
Addresses part of issue #506.
Before:
After: