Skip to content

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

Merged
merged 1 commit into from
Apr 24, 2025
Merged

Fix some static analysis errors #114997

merged 1 commit into from
Apr 24, 2025

Conversation

ericstj
Copy link
Member

@ericstj ericstj commented Apr 24, 2025

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.

@ericstj ericstj requested review from jay98014, a team and Copilot April 24, 2025 16:23
@ghost ghost added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Apr 24, 2025
Copy link
Contributor

@Copilot Copilot AI left a 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.

@ericstj ericstj merged commit 1ad5a1d into dotnet:main Apr 24, 2025
81 of 86 checks passed
@tarekgh
Copy link
Member

tarekgh commented Apr 24, 2025

/backport to release/10.0-preview4

Copy link
Contributor

Started backporting to release/10.0-preview4: https://github.com/dotnet/runtime/actions/runs/14652863963

@tarekgh
Copy link
Member

tarekgh commented Apr 24, 2025

Ooops wrong port PR. @ericstj please ignore the backport.

@github-actions github-actions bot locked and limited conversation to collaborators May 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy