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

Use polyfill package #3014

Merged
merged 1 commit into from
May 28, 2024
Merged

Use polyfill package #3014

merged 1 commit into from
May 28, 2024

Conversation

Evangelink
Copy link
Member

@@ -0,0 +1,114 @@
#nullable enable
Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure why but the analyzer suddenly triggered issues on the project although the configuration to not raise when the file doesn't exist is setup.


// We usually do not want to suppress issues through GlobalSuppressions file but in this case we have to do it because
// we are not able to suppress the issue differently.
[assembly: SuppressMessage("ApiDesign", "RS0030:Do not use banned APIs", Justification = "Source-generated file that cannot match analyzers requirements", Scope = "member", Target = "~M:System.Reflection.NullabilityInfoContext.CheckParameterMetadataType(System.Reflection.ParameterInfo,System.Reflection.NullabilityInfo)")]
Copy link
Member Author

Choose a reason for hiding this comment

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

We use a custom class for Debug.Assert (RoslynDebug) and string.IsNullOrXXX (RoslynString) that add annotation to the APIs. We are using banned apis to ensure they are used and it's triggering on the generated class although the generated code comment is setup.

@Evangelink Evangelink merged commit dcb0361 into microsoft:main May 28, 2024
7 checks passed
@Evangelink Evangelink deleted the polyfill branch May 28, 2024 15:23
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.

1 participant