Skip to content

[dotnet] Remove legacy static analyzer suppressions#17084

Merged
nvborisenko merged 1 commit intoSeleniumHQ:trunkfrom
nvborisenko:dotnet-warn-legacy
Feb 11, 2026
Merged

[dotnet] Remove legacy static analyzer suppressions#17084
nvborisenko merged 1 commit intoSeleniumHQ:trunkfrom
nvborisenko:dotnet-warn-legacy

Conversation

@nvborisenko
Copy link
Member

The main change is moving assembly-level compliance and copyright information from GlobalSuppressions.cs to AssemblyInfo.cs, and removing all code analysis suppressions from GlobalSuppressions.cs.

🔄 Types of changes

  • Cleanup (formatting, renaming)

Copilot AI review requested due to automatic review settings February 11, 2026 15:33
@qodo-code-review
Copy link
Contributor

PR Type

Enhancement


Description

  • Remove legacy static analyzer suppressions from GlobalSuppressions.cs

  • Move assembly-level CLSCompliant attribute to AssemblyInfo.cs

  • Eliminate outdated code analysis suppression messages

  • Clean up deprecated compliance configuration


File Walkthrough

Relevant files
Cleanup
GlobalSuppressions.cs
Delete legacy code analysis suppressions file                       

dotnet/src/webdriver/GlobalSuppressions.cs

  • Deleted entire file containing 71 lines of legacy code analysis
    suppressions
  • Removed assembly-level SuppressMessage attributes for various design,
    naming, and reliability warnings
  • Eliminated temporary suppressions for Interactions API
  • Removed copyright header and documentation comments
+0/-71   
Configuration changes
AssemblyInfo.cs
Create AssemblyInfo.cs with CLSCompliant attribute             

dotnet/src/webdriver/Properties/AssemblyInfo.cs

  • Created new AssemblyInfo.cs file with copyright header
  • Added assembly-level CLSCompliant(true) attribute
  • Migrated compliance configuration from GlobalSuppressions.cs
+20/-0   

@qodo-code-review
Copy link
Contributor

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-code-review
Copy link
Contributor

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
High-level
Reconsider removing all static analysis suppressions

Reconsider the wholesale removal of all static analysis suppressions. Deleting
them without resolving the underlying issues could introduce a large number of
build warnings, making it harder to find new problems.

Examples:

dotnet/src/webdriver/GlobalSuppressions.cs [1-71]

Solution Walkthrough:

Before:

// File: dotnet/src/webdriver/GlobalSuppressions.cs

// ... copyright header ...
// ... comments ...
[assembly: System.CLSCompliant(true)]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:...")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1020:...")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:...")]
// ... dozens of other suppressions ...

// This entire file is deleted in the PR.

After:

// Suggestion: Reconsider deleting the file.
// The file `GlobalSuppressions.cs` should be kept until the underlying
// static analysis warnings are fixed individually.

// File: dotnet/src/webdriver/GlobalSuppressions.cs
// (This file is not deleted)

// ... copyright header ...
// ... comments ...
[assembly: System.CLSCompliant(true)]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1006:...")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1020:...")]
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Reliability", "CA2000:...")]
// ... dozens of other suppressions ...
Suggestion importance[1-10]: 8

__

Why: The suggestion correctly identifies that deleting GlobalSuppressions.cs without fixing the underlying code issues could flood the build with warnings, which is a significant project maintainability concern.

Medium
  • More

Copy link
Contributor

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 the .NET WebDriver project’s legacy static analyzer suppression setup by removing the project-level suppression file and relocating the remaining assembly-level compliance attribute into a dedicated AssemblyInfo.cs.

Changes:

  • Added Properties/AssemblyInfo.cs containing the assembly-level CLSCompliant attribute (and the standard license header).
  • Removed GlobalSuppressions.cs, eliminating all legacy SuppressMessage-based analyzer suppressions.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
dotnet/src/webdriver/Properties/AssemblyInfo.cs Introduces a dedicated location for the CLSCompliant assembly attribute (plus license header).
dotnet/src/webdriver/GlobalSuppressions.cs Deletes legacy code-analysis suppression attributes and removes the file entirely.

@nvborisenko nvborisenko merged commit dd67b77 into SeleniumHQ:trunk Feb 11, 2026
28 checks passed
@nvborisenko nvborisenko deleted the dotnet-warn-legacy branch February 11, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants