-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Fix CA1846 and CA1845 for using AsSpan instead of Substring
#15738
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
Fix CA1846 and CA1845 for using AsSpan instead of Substring
#15738
Conversation
src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs
Outdated
Show resolved
Hide resolved
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.
Look good other than what Steve already pointed out.
|
I think it makes sense to add the rules in |
…letionCompleters.cs Co-authored-by: Steve Lee <slee@microsoft.com>
Co-authored-by: Steve Lee <slee@microsoft.com>
|
@iSazonov they are already there: Lines 473 to 479 in c49cf06
|
|
🎉 Handy links: |
PR Summary
Fix CA1846 and CA1845 violations by replacing Substring with AsSpan.
PR Context
These violations cause build break when used with .NET 6 Preview 6.
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.(which runs in a different PS Host).