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

Specify comparer when search resource name #280

Merged
merged 1 commit into from
Jan 30, 2024
Merged

Conversation

atifaziz
Copy link
Contributor

@atifaziz atifaziz commented Jan 7, 2024

The following line causes CA1310 to be flagged in a user project with code analysis enabled:

.GetManifestResourceNames().FirstOrDefault(x => x.EndsWith(resourceName));

It can fail the compilation of the host project if warnings are being treated as errors.

This PR updates the call to specify a comparer explicitly. The choice of StringComparison.Ordinal should be in line with Assembly.GetManifestResourceStream whose documentation states that name is “The case-sensitive name of the manifest resource being requested.”

@CLAassistant
Copy link

CLAassistant commented Jan 7, 2024

CLA assistant check
All committers have signed the CLA.

@kzu
Copy link
Member

kzu commented Jan 29, 2024

@atifaziz if you could sign the CLA, I can merge this!

@atifaziz
Copy link
Contributor Author

@atifaziz if you could sign the CLA, I can merge this!

Done

@kzu kzu enabled auto-merge (rebase) January 30, 2024 15:32
@kzu kzu merged commit 9d4fd28 into devlooped:main Jan 30, 2024
7 checks passed
@atifaziz atifaziz deleted the patch-1 branch January 30, 2024 15:57
@devlooped devlooped locked and limited conversation to collaborators Sep 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants