Skip to content

Conversation

martincostello
Copy link
Member

@martincostello martincostello commented Jun 2, 2025

Changes

  • Use dotnet format from the .NET SDK instead of the dotnet-format tool which is deprecated (see 🎉🥳 dotnet-format is now part of the .NET 6 SDK dotnet/format#1268) and does not understand modern C# features like primary constructors.
  • Fix warnings from dotnet format.
  • Explicitly set the line endings to use for files.
  • Downgrade csharp_style_namespace_declarations to a suggestion to avoid forcing adoption on existing files now and creating additional code churn.

Merge requirement checklist

  • Unit tests added/updated
  • CHANGELOG.md file updated for non-trivial changes
  • Changes in public API reviewed (if applicable)

- Use `dotnet format` from the .NET SDK instead of the `dotnet-format` tool which is deprecated and does not understand modern C# features like primary constructors.
- Fix warnings from `dotnet format`.
- Explicitly set the line endings to use for files.
- Downgrade `csharp_style_namespace_declarations` to a suggestion to avoid forcing adoption on existing files now and creating additional code churn.
@martincostello martincostello added the enhancement New feature or request label Jun 2, 2025
@martincostello martincostello mentioned this pull request Jun 2, 2025
3 tasks
@martincostello martincostello marked this pull request as ready for review June 2, 2025 16:33
@Copilot Copilot AI review requested due to automatic review settings June 2, 2025 16:33
@martincostello martincostello requested a review from a team as a code owner June 2, 2025 16:33
Copy link

@Copilot 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 migrates code formatting to use the .NET SDK's dotnet format tool and cleans up the code by removing deprecated and unused using directives. Key changes include:

  • Replacing the deprecated dotnet-format tool with dotnet format in the GitHub workflow.
  • Removing several obsolete using directives from test and source files.
  • Updating configuration files (.editorconfig, .gitattributes) to explicitly set line endings and adjust code style suggestions.

Reviewed Changes

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

Show a summary per file
File Description
tests/* Removed deprecated/unused using directives from test files.
src/* Removed unused using directives and adjusted using ordering.
.github/workflows/dotnet-format.yml Switched from installing dotnet-format to using dotnet format.
.gitattributes Added line ending configuration.
.editorconfig Set explicit end_of_line and downgraded namespace declaration severity to suggestion.

@martincostello martincostello enabled auto-merge (squash) June 2, 2025 16:34
@martincostello martincostello merged commit 5349314 into main Jun 2, 2025
10 checks passed
@martincostello martincostello deleted the fix-dotnet-format branch June 2, 2025 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants