Skip to content

Append dot to warning messages conditionally #701

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

Merged
merged 2 commits into from
Feb 17, 2021

Conversation

jkotas
Copy link
Member

@jkotas jkotas commented Feb 17, 2021

No description provided.

@jkotas jkotas added the area-NativeAOT-coreclr .NET runtime optimized for ahead of time compilation label Feb 17, 2021
@jkotas
Copy link
Member Author

jkotas commented Feb 17, 2021

Context: #690 (comment)

@@ -1707,8 +1707,13 @@ public override bool HandleCall(MethodIL callingMethodBody, MethodDesc calledMet
if (shouldEnableReflectionWarnings &&
calledMethod.HasCustomAttribute("System.Diagnostics.CodeAnalysis", "RequiresUnreferencedCodeAttribute"))
{
string attributeMessage = DiagnosticUtilities.GetRequiresUnreferencedCodeAttributeMessage(calledMethod);

if (attributeMessage.Length > 0 && attributeMessage[attributeMessage.Length - 1] != '.')
Copy link

@MichalPetryka MichalPetryka Feb 17, 2021

Choose a reason for hiding this comment

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

Couldn't !attributeMessage.EndsWith('.') be used here?

Copy link
Member

@MichalStrehovsky MichalStrehovsky left a comment

Choose a reason for hiding this comment

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

Thank you!

@jkotas jkotas merged commit 8daa7db into dotnet:feature/NativeAOT Feb 17, 2021
@jkotas jkotas deleted the append-dot branch February 25, 2021 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-NativeAOT-coreclr .NET runtime optimized for ahead of time compilation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants