-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Fix some static analysis errors #114997
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 some static analysis errors #114997
Conversation
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.
Pull Request Overview
This PR cleans up static analysis issues flagged by internal compliance tools by ensuring proper operator usage and correcting parameter usage in string formatting.
- Replaced bitwise OR operators with logical OR in conditional expressions.
- Removed an extraneous parameter in a string formatting call.
- Adjusted conditional checks for method attributes.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
File | Description |
---|---|
src/libraries/System.Threading.Channels/src/System/Threading/Channels/BoundedChannel.cs | Fixed a logical operation to use OR ( |
src/libraries/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/DirectoryServer.cs | Corrected operator usage in error code comparisons by replacing bitwise OR ( |
src/libraries/System.Composition.TypedParts/src/System/Composition/TypedParts/ActivationFeatures/OnImportsSatisfiedFeature.cs | Updated the conditional check to use logical OR ( |
src/libraries/System.ComponentModel.Composition/src/System/ComponentModel/Composition/CompositionException.cs | Removed an unnecessary parameter from the string formatting call to match the expected format. |
src/libraries/System.Threading.Channels/src/System/Threading/Channels/BoundedChannel.cs
Show resolved
Hide resolved
...ies/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/DirectoryServer.cs
Show resolved
Hide resolved
...ies/System.DirectoryServices/src/System/DirectoryServices/ActiveDirectory/DirectoryServer.cs
Show resolved
Hide resolved
...TypedParts/src/System/Composition/TypedParts/ActivationFeatures/OnImportsSatisfiedFeature.cs
Show resolved
Hide resolved
...tem.ComponentModel.Composition/src/System/ComponentModel/Composition/CompositionException.cs
Show resolved
Hide resolved
/backport to release/10.0-preview4 |
Started backporting to release/10.0-preview4: https://github.com/dotnet/runtime/actions/runs/14652863963 |
Ooops wrong port PR. @ericstj please ignore the backport. |
These were all flagged by internal compliance tooling. None of these seem to create functional issues, but it's easier to clean them up then suppress the compliance tool diagnostics.