Skip to content

Conversation

@deepsource-autofix
Copy link
Contributor

This PR refactors object creation expressions across the codebase to leverage C# 9 target-typed new expressions, removing redundant type declarations when the type is already specified on the left-hand side.

  • Type can be dropped from the declaration's RHS when explicitly mentioned in the LHS: This issue highlighted redundant instantiations where the same type was declared on both sides of variable assignments. The patch replaces these with target-typed new expressions (such as new() or new(args)), streamlining the code and improving readability.

This Autofix was generated by AI. Please review the change before merging.

This PR refactors object creation expressions across the codebase to leverage C# 9 target-typed new expressions, removing redundant type declarations when the type is already specified on the left-hand side.

- Type can be dropped from the declaration's RHS when explicitly mentioned in the LHS: This issue highlighted redundant instantiations where the same type was declared on both sides of variable assignments. The patch replaces these with target-typed new expressions (such as `new()` or `new(args)`), streamlining the code and improving readability.

> This Autofix was generated by AI. Please review the change before merging.
@deepsource-io
Copy link

deepsource-io bot commented Sep 22, 2025

Here's the code health analysis summary for commits 24fd392..5fbbc10. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource C# LogoC#❌ Failure
❗ 2 occurences introduced
🎯 83 occurences resolved
View Check ↗
DeepSource Docker LogoDocker✅ SuccessView Check ↗
DeepSource JavaScript LogoJavaScript✅ SuccessView Check ↗
DeepSource SQL LogoSQL✅ SuccessView Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

@StuartFerguson StuartFerguson merged commit e251d66 into master Sep 22, 2025
10 of 11 checks passed
@github-actions github-actions bot deleted the deepsource-autofix-a3aad22b branch November 22, 2025 00:48
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.

2 participants