Commit 812a93f
committed
refactor: enable nullable reference types in BenchmarkReport (#754)
This pull request refactors the `Pipeline/BenchmarkReport.cs` file to modernize and simplify the code, making it more idiomatic and concise. The changes focus on improving code readability, reducing redundancy, and leveraging newer C# features such as target-typed `new`, nullable reference types, and pattern-based null checks.
**Key improvements include:**
### Code Modernization & Simplification
* Replaced explicit type declarations with `var` where appropriate, streamlined null checks, and used target-typed `new` for object initialization, resulting in more concise and readable code throughout the file.
* Replaced multi-line `if` statements with single-line expressions where possible, and simplified method bodies by removing unnecessary braces and lines.
### Nullable Reference Types & Type Safety
* Updated methods and parameters to use nullable reference types (e.g., `string[]?`) and added `[NotNullWhen(true)]` attributes to improve type safety and nullability awareness.
### Access Modifiers & Redundant Code
* Removed the `internal` access modifier from classes and records that did not require it, making them package-private and simplifying the file.
* Removed redundant using directives and unnecessary comments, and suppressed certain ReSharper warnings for clarity.1 parent 681a2cf commit 812a93f
2 files changed
Lines changed: 390 additions & 460 deletions
0 commit comments