-
Notifications
You must be signed in to change notification settings - Fork 519
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
[Rgen] Complete the BindingTypeAttribute analyzer. #21946
[Rgen] Complete the BindingTypeAttribute analyzer. #21946
Conversation
The analyzer now checks the following: * All useages of bindingTypeAttribute<T> have to happen on partial classes. * BidingType<Class> can only be used on classes. * BindingType<Category> can only be used on static classes. * BindingType<Protocol> can only be used on interfaces. * BindingType can onlye be used on enums. Because we have not yet released any of the errors, we have sorted them to be the first ones from 0001-0006.
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.
Copilot reviewed 5 out of 10 changed files in this pull request and generated 2 comments.
Files not reviewed (5)
- src/rgen/Microsoft.Macios.Bindings.Analyzer/Resources.Designer.cs: Language not supported
- src/rgen/Microsoft.Macios.Bindings.Analyzer/Resources.resx: Language not supported
- src/rgen/Microsoft.Macios.Bindings.Analyzer/AnalyzerReleases.Unshipped.md: Evaluated as low risk
- src/rgen/Microsoft.Macios.Bindings.Analyzer/BindingTypeSemanticAnalyzer.cs: Evaluated as low risk
- src/rgen/Microsoft.Macios.Bindings.Analyzer/Extensions/IBindingTypeAnalyzerExtensions.cs: Evaluated as low risk
src/rgen/Microsoft.Macios.Bindings.Analyzer/Extensions/BaseTypeDeclarationSyntaxExtensions.cs
Outdated
Show resolved
Hide resolved
yield return [ | ||
nonPartialClassBinding, | ||
BindingTypeSemanticAnalyzer.RBI0001.Id, | ||
"The binding type 'Test.Examples' must declared as a partial class" |
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.
The error message has a typo: 'The binding type 'Test.Examples' must declared as a partial class' should be 'The binding type 'Test.Examples' must be declared as a partial class'.
"The binding type 'Test.Examples' must declared as a partial class" | |
"The binding type 'Test.Examples' must be declared as a partial class" |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
/azp run xamarin-macios-pr |
…eDeclarationSyntaxExtensions.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Azure Pipelines successfully started running 1 pipeline(s). |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
src/rgen/Microsoft.Macios.Bindings.Analyzer/BindingTypeSemanticAnalyzer.cs
Outdated
Show resolved
Hide resolved
…cAnalyzer.cs Co-authored-by: Rolf Bjarne Kvinge <rolf@xamarin.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [CI Build] Build passed (Build packages) ✅Pipeline on Agent |
✅ [CI Build] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ [CI Build] Build passed (Build macOS tests) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
💻 [CI Build] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [CI Build] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
💻 [CI Build] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
💻 [CI Build] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
💻 [CI Build] Windows Integration Tests passed 💻✅ All Windows Integration Tests passed. Pipeline on Agent |
✅ API diff for current PR / commit.NET ( No breaking changes )❗ API diff vs stable (Breaking changes).NET ( ❗ Breaking changes ❗ )ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
🔥 [CI Build] Test results 🔥Test results❌ Tests failed on VSTS: test results 0 tests crashed, 1 tests failed, 110 tests passed. Failures❌ monotouch tests (macOS)
Html Report (VSDrops) Download Successes✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
The analyzer now checks the following:
bindingTypeAttribute<T>
have to happen on partial classes.BindingType<Class>
can only be used on classes.BindingType<Category>
can only be used on static classes.BindingType<Protocol>
can only be used on interfaces.BindingType<StrongDictionary>
can only be used on classes.BindingType
can only be used on enums.Because we have not yet released any of the errors, we have sorted them to be the first ones from 0001-0006.