-
Notifications
You must be signed in to change notification settings - Fork 468
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
Override Stream ReadAsync/WriteAsync Analyzer #4725
Closed
NewellClark
wants to merge
55
commits into
dotnet:merges/master-to-release/6.0.1xx-preview1
from
NewellClark:issue-33789
Closed
Override Stream ReadAsync/WriteAsync Analyzer #4725
NewellClark
wants to merge
55
commits into
dotnet:merges/master-to-release/6.0.1xx-preview1
from
NewellClark:issue-33789
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…release/6.0.1xx-preview1
….0.1xx-preview1 Merge master to release/6.0.1xx-preview1
….0.1xx-preview1 Merge master to release/6.0.1xx-preview1
….0.1xx-preview1 Merge master to release/6.0.1xx-preview1
…/6.0.1xx-preview1
….0.1xx-preview1 Merge master to release/6.0.1xx-preview1
Remove rule CA1801 - replaced by IDE0060
…release/6.0.1xx-preview1
….0.1xx-preview1 Merge master to release/6.0.1xx-preview1
….0.1xx-preview1 Merge master to release/6.0.1xx-preview1
….0.1xx-preview1 Merge master to release/6.0.1xx-preview1
…release/6.0.1xx-preview1
….0.1xx-preview1 Merge master to release/6.0.1xx-preview1
….0.1xx-preview1 Merge master to release/6.0.1xx-preview1
….0.1xx-preview1 Merge master to release/6.0.1xx-preview1
….0.1xx-preview1 Merge master to release/6.0.1xx-preview1
….0.1xx-preview1 Merge master to release/6.0.1xx-preview1
….0.1xx-preview1 Merge master to release/6.0.1xx-preview1
…release/6.0.1xx-preview1
….0.1xx-preview1 Merge master to release/6.0.1xx-preview1
….0.1xx-preview1 Merge master to release/6.0.1xx-preview1
…release/6.0.1xx-preview1
….0.1xx-preview1 Merge master to release/6.0.1xx-preview1
…/6.0.1xx-preview1
….0.1xx-preview1 Merge master to release/6.0.1xx-preview1
Remove single-file analyzer
….0.1xx-preview1 Merge master to release/6.0.1xx-preview1
….0.1xx-preview1 Merge master to release/6.0.1xx-preview1
…/6.0.1xx-preview1
….0.1xx-preview1 Merge master to release/6.0.1xx-preview1
Implement Prefer IsKind analyzer
* Ensure CA1835 preserves nullability * Remove spacing from VB file. * Add extra nullability sub-cases in new unit tests. * Remove extra space causing CI failure. * Add nullability tests with CancellationToken Co-authored-by: carlossanlop <[email protected]>
Revert workaround for old SyntaxGenerator bug
Make all rules warning for RulesetKind.AllEnabled
Fix issue #33789
@NewellClark Seems like your PR has many more changes then intended. |
The target branch seems to be incorrect |
Oops, so I did. I will fix it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes issue #33789.
I ran the analyzer against dotnet/runtime and found several violations:
We could do what we're doing for
CryptoStream
and check if theMemory<byte>
is actually an array, and if not simply do the copy, but since this interface is internal, I figured we might be able to explore other options.ReadAsync
/WriteAsync
are only ever called from WebSocketBase, which only calls the array-based override. Unfortunately,WebSocketHttpListenerDuplexStream
also calls back intoWebSocket
, and it passes the array it was given into multiple different methods onWebSocket
, and some methods on WebSocketBuffer. Providing memory-based overrides would require almost a complete rewrite ofWebSocketBuffer
as well as changes to code that consumes it. Since nothing currently calls the memory-based overrides onWebSocketHttpListenerDuplexStream
, I think we should strongly consider suppressing the warning.