Fix various analyzer errors#9156
Conversation
There was a problem hiding this comment.
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.
Fusion Gateway Performance ResultsSimple Composite Query
Response Times & Query
query TestQuery {
topProducts(first: 5) {
inStock
name
price
shippingEstimate
upc
weight
reviews {
id
body
author {
id
username
name
}
}
}
}Deep Recursion Query
Response Times & Query
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
Response Times & Query
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary of the changes (Less than 80 chars)