Skip to content
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

[src] Add a comma after the last value in multi-line initializers. #22251

Merged

Conversation

rolfbjarne
Copy link
Member

Enable the SA1413 stylecop rule - "Use trailing comma in multi-line
initializers", and fix all resulting build warnings.

Most importantly, this means adding a comma after the last enum value in an
enum. The stylecop rule also detects this for other types if multi-line
initializers, such as object initializers and array creations, so fix those as
well (there weren't many of these though).

Enable the SA1413 stylecop rule - "Use trailing comma in multi-line
initializers", and fix all resulting build warnings.

Most importantly, this means adding a comma after the last enum value in an
enum. The stylecop rule also detects this for other types if multi-line
initializers, such as object initializers and array creations, so fix those as
well (there weren't many of these though).
Copy link
Member

@dalexsoto dalexsoto left a comment

Choose a reason for hiding this comment

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

I am surprised about the amount of commas missing heh, specially since we are very adamant about them

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [PR Build #2745c69] Build passed (Build packages) ✅

Pipeline on Agent
Hash: 2745c691e74fd08876bde62f3006609416cda5b7 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [PR Build #2745c69] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: 2745c691e74fd08876bde62f3006609416cda5b7 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ [PR Build #2745c69] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: 2745c691e74fd08876bde62f3006609416cda5b7 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [PR Build #2745c69] Tests on macOS M1 - Mac Monterey (12) passed 💻

All tests on macOS M1 - Mac Monterey (12) passed.

Pipeline on Agent
Hash: 2745c691e74fd08876bde62f3006609416cda5b7 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [PR Build #2745c69] Tests on macOS X64 - Mac Sonoma (14) passed 💻

All tests on macOS X64 - Mac Sonoma (14) passed.

Pipeline on Agent
Hash: 2745c691e74fd08876bde62f3006609416cda5b7 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [PR Build #2745c69] Tests on macOS arm64 - Mac Sequoia (15) passed 💻

All tests on macOS arm64 - Mac Sequoia (15) passed.

Pipeline on Agent
Hash: 2745c691e74fd08876bde62f3006609416cda5b7 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [PR Build #2745c69] Tests on macOS M1 - Mac Ventura (13) passed 💻

All tests on macOS M1 - Mac Ventura (13) passed.

Pipeline on Agent
Hash: 2745c691e74fd08876bde62f3006609416cda5b7 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

💻 [CI Build #2745c69] Windows Integration Tests passed 💻

All Windows Integration Tests passed.

Pipeline on Agent
Hash: 2745c691e74fd08876bde62f3006609416cda5b7 [PR build]

@vs-mobiletools-engineering-service2
Copy link
Collaborator

✅ API diff for current PR / commit

.NET ( No breaking changes )

❗ API diff vs stable (Breaking changes)

.NET ( ❗ Breaking changes ❗ )

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 2745c691e74fd08876bde62f3006609416cda5b7 [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2
Copy link
Collaborator

🚀 [CI Build #2745c69] Test results 🚀

Test results

✅ All tests passed on VSTS: test results.

🎉 All 112 tests passed 🎉

Tests counts

✅ cecil: All 1 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ introspection: All 4 tests passed. Html Report (VSDrops) Download
✅ linker: All 44 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 8 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 11 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 9 tests passed. [attempt 3] Html Report (VSDrops) Download
✅ monotouch (tvOS): All 8 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

Pipeline on Agent
Hash: 2745c691e74fd08876bde62f3006609416cda5b7 [PR build]

@rolfbjarne rolfbjarne marked this pull request as ready for review March 3, 2025 15:16
@rolfbjarne rolfbjarne merged commit ad03dc9 into main Mar 3, 2025
47 checks passed
@rolfbjarne rolfbjarne deleted the dev/rolf/stylecop-trailing-comma-in-multiline-initializers branch March 3, 2025 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants