-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Add test demonstrating how trivia is handled #69448
Conversation
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.
It looks like the fixed code is missing a trailing comma in two cases.
[ | ||
// Leading | ||
new[] { 1 }, // Trailing | ||
new int[] { 2 } |
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.
new int[] { 2 } | |
new int[] { 2 }, |
[ | ||
// Leading | ||
[1], // Trailing | ||
[2] |
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.
[2] | |
[2], |
currently our features do not add a trailing comma, unless they're adding to an existing initializer that already had one. I'm open to updating this decision and adding trailing commas in more places. However, i would like to do that outside of this PR. @sharwell if we did go this route, would you be ok with these rules:
If that fits what you want, i can make a followup PR to encode those rules. Thanks! |
Yes, those are exactly the expected rules. I believe we settled on them in an earlier discussion. We should prioritize that work, as the current refactoring produces code which is problematic for maintainability. |
Sure. I'll do tomorrow. |
No description provided.