Skip to content

Conversation

cimnine
Copy link
Contributor

@cimnine cimnine commented Aug 13, 2025

What does this PR do?

Adds csharpier.

Why is it important?

  • It will no longer be a manual task to check if the formatting is correct.
  • It will level opinions about the formatting (it's the way the formatter does it and that's the way it is.)

Related issues

How to test this PR

There are two commits in this MR:

  • First commit adds csharpier and infrastructure (small change)
  • Second commit applies dotnet csharpier format . for the first time (big change)

Copy link

netlify bot commented Aug 13, 2025

Deploy Preview for testcontainers-dotnet ready!

Name Link
🔨 Latest commit ff77f28
🔍 Latest deploy log https://app.netlify.com/projects/testcontainers-dotnet/deploys/68b4472a6ead44000701d24d
😎 Deploy Preview https://deploy-preview-1513--testcontainers-dotnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@cimnine cimnine marked this pull request as ready for review August 13, 2025 13:54
Copy link
Collaborator

@HofmeisterAn HofmeisterAn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Could we split this into smaller steps? Maybe start by adding the CSharpier config/tooling (disabled at first), then enable it gradually across the repo. WDYT?

Also, can we hook it into Cake so we can run a task to check formatting? Since our CI is built on Cake, that would fit perfectly.

@cimnine
Copy link
Contributor Author

cimnine commented Aug 31, 2025

Could we split this into smaller steps? Maybe start by adding the CSharpier config/tooling (disabled at first), then enable it gradually across the repo. WDYT?

What are the advantages for choosing this route?

Also, can we hook it into Cake so we can run a task to check formatting? Since our CI is built on Cake, that would fit perfectly.

What are the advantages of the formatter running for every project independently? A typical check across the whole project takes below 1s (after the first run). It's not significantly faster if run for each project independently.

Also, if it's integrated into the cake process, you won't get feedback in the PR. The GitHub Action can do that.

@HofmeisterAn
Copy link
Collaborator

What are the advantages for choosing this route?

It's easier to review and to understand/see the changes. I can also take a look at the two commits and see how far I get. I mean, the first one is trivial.

What are the advantages of the formatter running for every project independently?

Oh, I didn't mean it should be done independently. I was just thinking of having a Cake task so we can run it the same way locally and in CI. That's already been helpful with other tooling. I just don't know much about CSharpier and how it works (its tooling around).

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.

[Enhancement]: csharpier for formatting
2 participants