Skip to content

refactor: use file scoped namespaces#134

Merged
StuartFerguson merged 3 commits intomainfrom
deepsource-autofix-9ce2dbf5
Sep 19, 2025
Merged

refactor: use file scoped namespaces#134
StuartFerguson merged 3 commits intomainfrom
deepsource-autofix-9ce2dbf5

Conversation

@deepsource-autofix
Copy link
Copy Markdown
Contributor

This PR modernizes the C# codebase by converting all traditional block-style namespace declarations to file-scoped namespace syntax. This change flattens the file structure, removes unnecessary indentation levels, and aligns the code with the latest C# conventions.

  • Use File Scoped namespaces instead of typical namespaces: Many source files originally declared block-scoped namespaces with braces, causing extra nesting and indentation. Each file has been updated to use the file-scoped namespace syntax (ending with a semicolon), and the using directives and class/record declarations have been moved to the top of the file. This refactor improves readability and consistency across the project.

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

This PR modernizes the C# codebase by converting all traditional block-style namespace declarations to file-scoped namespace syntax. This change flattens the file structure, removes unnecessary indentation levels, and aligns the code with the latest C# conventions.

- Use File Scoped `namespace`s instead of typical `namespace`s: Many source files originally declared block-scoped namespaces with braces, causing extra nesting and indentation. Each file has been updated to use the file-scoped namespace syntax (ending with a semicolon), and the `using` directives and class/record declarations have been moved to the top of the file. This refactor improves readability and consistency across the project.

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

deepsource-io Bot commented Sep 19, 2025

Here's the code health analysis summary for commits 66fdec1..5d6a824. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource C# LogoC#✅ Success
🎯 7 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 and others added 2 commits September 19, 2025 08:39
This PR refactors lambda expressions that contain only a single statement to use more concise, expression-bodied forms and improves readability across chained calls.

- Consider simplifying lambda when its body has a single statement: The original code used a block lambda for an async call and a tightly coupled Setup expression. In the first patch, the `Setup(a => a.GetLatestVersion(...))` call is reformatted across multiple lines for clarity while retaining its expression-bodied form. In the second patch, the multi-line block inside `Should.NotThrow(async () => { await ... })` is converted into an inline, expression-bodied async lambda, removing unnecessary braces and making the code more succinct.

> This Autofix was generated by AI. Please review the change before merging.
@StuartFerguson StuartFerguson merged commit 332f413 into main Sep 19, 2025
11 checks passed
@github-actions github-actions Bot deleted the deepsource-autofix-9ce2dbf5 branch November 19, 2025 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant