Skip to content

Fix various analyzer errors#9156

Merged
michaelstaib merged 1 commit intomainfrom
gai/fix-analyzer-errors
Feb 19, 2026
Merged

Fix various analyzer errors#9156
michaelstaib merged 1 commit intomainfrom
gai/fix-analyzer-errors

Conversation

@glen-84
Copy link
Copy Markdown
Member

@glen-84 glen-84 commented Feb 19, 2026

Summary of the changes (Less than 80 chars)

  • Fix various analyzer errors.

Copilot AI review requested due to automatic review settings February 19, 2026 14:39
Copy link
Copy Markdown
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 fixes various C# analyzer warnings to improve code quality and consistency. The changes align with the project's code style requirements by enabling the IDE0011 analyzer rule that requires braces for all if statements, and fixing related warnings throughout the codebase.

Changes:

  • Added IDE0011 analyzer rule to require braces for all if statements and applied fixes throughout the codebase
  • Removed unused using directives across multiple files (IDE0005)
  • Modernized code with collection expressions and simplified patterns (IDE0028, null-coalescing assignment)
  • Fixed conditional compilation for NETSTANDARD2_0 compatibility with System.Diagnostics.CodeAnalysis

Reviewed changes

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

Show a summary per file
File Description
.editorconfig Enabled IDE0011 warning for required braces and removed ReSharper setting for optional braces
TestSequenceSegment.cs Added braces to single-line if statements to comply with IDE0011
MultiSegmentReaderTests.cs Modernized Array.Empty() to collection expression []
WellKnownNames.cs Added conditional compilation directives for System.Diagnostics.CodeAnalysis import for NETSTANDARD2_0
PlannerEventSourceTests.cs Removed unnecessary cast from int to int when comparing plan.SearchSpace
OperationPlanSingleFlightTests.cs Removed unused using directive for Pipeline namespace
OperationPlanner.PlanBase.cs Removed unused using directive for Types namespace
FusionSchemaDefinition.cs Simplified if-null pattern to null-coalescing assignment operator
SortingContext.cs Removed unused using directive for Projections.Expressions.Handlers
DeferExecutionCoordinator.cs Removed unused using directive for System.Diagnostics

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Copy Markdown
Contributor

Fusion Gateway Performance Results

Simple Composite Query

Req/s Err%
Constant (50 VUs) 2976.82 0.00%
Ramping (0-500-0 VUs) 3328.22 0.00%
Response Times & Query
Min Med Avg P90 P95 Max
Constant 0.73ms 14.65ms 16.58ms 30.64ms 36.17ms 171.56ms
Ramping 0.78ms 66.04ms 66.93ms 123.59ms 138.87ms 267.04ms
query TestQuery {
  topProducts(first: 5) {
    inStock
    name
    price
    shippingEstimate
    upc
    weight
    reviews {
      id
      body
      author {
        id
        username
        name
      }
    }
  }
}

Deep Recursion Query

Req/s Err%
Constant (50 VUs) 746.49 0.00%
Ramping (0-500-0 VUs) 829.27 0.00%
Response Times & Query
Min Med Avg P90 P95 Max
Constant 9.12ms 62.37ms 65.48ms 80.60ms 89.48ms 378.54ms
Ramping 1.84ms 247.35ms 260.20ms 528.01ms 562.94ms 686.01ms
query TestQuery {
  users {
    id
    username
    name
    reviews {
      id
      body
      product {
        inStock
        name
        price
        shippingEstimate
        upc
        weight
        reviews {
          id
          body
          author {
            id
            username
            name
            reviews {
              id
              body
              product {
                inStock
                name
                price
                shippingEstimate
                upc
                weight
              }
            }
          }
        }
      }
    }
  }
  topProducts(first: 5) {
    inStock
    name
    price
    shippingEstimate
    upc
    weight
    reviews {
      id
      body
      author {
        id
        username
        name
        reviews {
          id
          body
          product {
            inStock
            name
            price
            shippingEstimate
            upc
            weight
          }
        }
      }
    }
  }
}

Variable Batching Throughput

Req/s Err%
Constant (50 VUs) 23627.84 0.00%
Ramping (0-500-0 VUs) 18492.21 0.00%
Response Times & Query
Min Med Avg P90 P95 Max
Constant 0.10ms 1.71ms 2.07ms 3.93ms 4.83ms 50.64ms
Ramping 0.10ms 9.42ms 11.46ms 23.60ms 28.31ms 115.64ms
query TestQuery($upc: ID!, $price: Long!, $weight: Long!) {
  productByUpc(upc: $upc) {
    inStock
    shippingEstimate(weight: $weight, price: $price)
  }
}

Variables (5 sets batched per request)

[
  { "upc": "1", "price": 899, "weight": 100 },
  { "upc": "2", "price": 1299, "weight": 1000 },
  { "upc": "3", "price": 15, "weight": 20 },
  { "upc": "4", "price": 499, "weight": 100 },
  { "upc": "5", "price": 1299, "weight": 1000 }
]

Run 22186272870 • Commit 906446c • Thu, 19 Feb 2026 14:57:38 GMT

@michaelstaib michaelstaib merged commit 1439cc6 into main Feb 19, 2026
123 checks passed
@michaelstaib michaelstaib deleted the gai/fix-analyzer-errors branch February 19, 2026 15:06
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (6a3b7a3) to head (8e6bcdd).
⚠️ Report is 773 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #9156       +/-   ##
==========================================
- Coverage   74.16%       0   -74.17%     
==========================================
  Files        2677       0     -2677     
  Lines      140790       0   -140790     
  Branches    16371       0    -16371     
==========================================
- Hits       104421       0   -104421     
+ Misses      30774       0    -30774     
+ Partials     5595       0     -5595     
Flag Coverage Δ
unittests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants