Skip to content

Generate diagnostics without a leading comma, retain old spaces#17534

Merged
weswigham merged 2 commits intomicrosoft:masterfrom
weswigham:fix-generate-diagnostics
Jul 31, 2017
Merged

Generate diagnostics without a leading comma, retain old spaces#17534
weswigham merged 2 commits intomicrosoft:masterfrom
weswigham:fix-generate-diagnostics

Conversation

@weswigham
Copy link
Copy Markdown
Member

@minestarks This should once more generate valid json, and with the same whitespace it did before; which should help with the diffs.

Fixes a comment on #17463

@weswigham weswigham requested a review from minestarks July 31, 2017 18:37
@weswigham weswigham changed the title Generate diagnostics without a leading comma, reatain old spaces Generate diagnostics without a leading comma, retain old spaces Jul 31, 2017
Comment thread scripts/processDiagnosticMessages.ts Outdated

return result;
// Shave trailing comma, then add newline and ending brace
return result.slice(0, result.length - 1) + '\r\n}';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could messageTable have zero elements at this point? I think the shaving of the comma would be wrong then.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only if we have zero diagnostics. Which we should never have. Or minimally we shouldn't still be generating this file if we do not.

@weswigham weswigham merged commit 32d9292 into microsoft:master Jul 31, 2017
@weswigham weswigham deleted the fix-generate-diagnostics branch July 31, 2017 19:51
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants