-
Notifications
You must be signed in to change notification settings - Fork 3
More precise diagnostics for methods attributes with wrong types #4514
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -143,6 +143,15 @@ public static readonly DiagnosticDescriptor MissingSerializableAttributeOnType | |
| helpLinkUri: DocsPageHelper.GetCliDocsPageUrl($"{TROUBLESHOOTING_GUIDE_BASE_URL}#missing-serializable-attribute-on-type", Constants.CLI_CURRENT_DOCS_VERSION), | ||
| isEnabledByDefault: true); | ||
|
|
||
| public static readonly DiagnosticDescriptor MissingSerializableAttributeForArgument | ||
| = new(MISSING_SERIALIZABLE_ATTRIBUTE_ON_TYPE_ID, | ||
|
Comment on lines
+146
to
+147
|
||
| "Argument type is not serializable", | ||
| $"Type of argument '{{1}}' must be serializable or have [BeamGenerateSchema] attribute. Either add the [Serializable] attribute to type '{{0}}' or use different type.", | ||
| Category_Services, | ||
| DiagnosticSeverity.Error, | ||
| helpLinkUri: DocsPageHelper.GetCliDocsPageUrl($"{TROUBLESHOOTING_GUIDE_BASE_URL}#missing-serializable-attribute-on-type", Constants.CLI_CURRENT_DOCS_VERSION), | ||
| isEnabledByDefault: true); | ||
|
|
||
| public static readonly DiagnosticDescriptor PropertiesFoundInSerializableTypes | ||
| = new(PROPERTIES_FOUND_IN_SERIALIZABLE_TYPES_ID, | ||
| $"Properties in serializable types are ignored by the client code generator", | ||
|
|
||
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.
Both branches of this 'if' statement write to the same variable - consider using '?' to express intent better.