Skip to content

Fix CA1309: Use ordinal StringComparison in CertificateProvider - #14352

Merged
Ilya (iSazonov) merged 2 commits into
PowerShell:masterfrom
xtqqczze:CA1309-p1
Jun 25, 2021
Merged

Fix CA1309: Use ordinal StringComparison in CertificateProvider#14352
Ilya (iSazonov) merged 2 commits into
PowerShell:masterfrom
xtqqczze:CA1309-p1

Conversation

@xtqqczze

@xtqqczze xtqqczze commented Dec 8, 2020

Copy link
Copy Markdown
Contributor

Non-breaking change, just makes existing behaviour explicit.

https://docs.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1309

@ghost ghost assigned Ilya (iSazonov) Dec 8, 2020
Comment thread src/Microsoft.PowerShell.Security/security/CertificateProvider.cs
@iSazonov Ilya (iSazonov) added the CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log label Dec 9, 2020
@ghost ghost added the Review - Needed The PR is being reviewed label Dec 18, 2020
@ghost

Copy link
Copy Markdown

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

According to the documentation, the default string compare is ordinal. But I think it makes sense to explicitly set the Comparer to make intention clear.

@xtqqczze xtqqczze closed this Jun 24, 2021
@xtqqczze xtqqczze reopened this Jun 24, 2021
@iSazonov
Ilya (iSazonov) merged commit a3366b8 into PowerShell:master Jun 25, 2021
@ghost ghost removed the Review - Needed The PR is being reviewed label Jun 25, 2021
@iSazonov Ilya (iSazonov) added this to the 7.2.0-preview.8 milestone Jun 25, 2021
@xtqqczze
xtqqczze deleted the CA1309-p1 branch June 25, 2021 12:22
@xtqqczze

Copy link
Copy Markdown
Contributor Author

Contributes to #15669.

@ghost

Copy link
Copy Markdown

🎉v7.2.0-preview.8 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants