Skip to content

Update .NET sample#491

Merged
martincostello merged 10 commits into
mainfrom
dotnet-formatting
May 19, 2025
Merged

Update .NET sample#491
martincostello merged 10 commits into
mainfrom
dotnet-formatting

Conversation

@martincostello
Copy link
Copy Markdown
Member

@martincostello martincostello commented May 19, 2025

  • Use idiomatic formatting for C# (4 spaces, CRLF).
  • Avoid repetition with constants for OTLP endpoint.
  • Make endpoint handler methods static.
  • Avoid using .NET preview SDKs if installed locally.
  • Launch the app to the /rolldice endpoint to avoid an HTTP 404 when navigating to the root URL.
  • Update the OpenTelemetry NuGet packages to the latest stable release.
  • Simplify .NET Dockerfile by just publishing the app.
  • Add cache for NuGet packages.
  • Use ASPNETCORE_HTTP_PORTS.
  • Avoid redundant superlinter work for C# (before vs after).

- Use idiomatic formatting for C# (4 spaces, CRLF).
- Avoid repetition with constants for OTLP endpoint.
- Make endpoint handler methods `static`.
Avoid using .NET preview SDKs if installed.
Launch the app to the `/rolldice` endpoint to avoid an HTTP 404 when navigating to the root URL.
Update the OpenTelemetry NuGet packages to the latest stable release.
- Simplify by just publishing the app.
- Add cache for NuGet packages.
- Use `ASPNETCORE_HTTP_PORTS`.
Remove rogue space.
Disable .NET SDK features we don't need to speed things up.
Copy link
Copy Markdown
Member

@zeitlinger zeitlinger left a comment

Choose a reason for hiding this comment

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

great!

Comment thread .github/workflows/super-linter.yml Outdated
Comment thread .editorconfig Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

great - didn't know this is possible

Comment thread .editorconfig Outdated
Arbitrarily set 180.
Move into `super-linter.env`.
Fix sorting(?)
@martincostello martincostello marked this pull request as ready for review May 19, 2025 13:31
@martincostello martincostello enabled auto-merge (squash) May 19, 2025 13:31
@martincostello martincostello merged commit 7150bee into main May 19, 2025
43 checks passed
@martincostello martincostello deleted the dotnet-formatting branch May 19, 2025 13:33
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.

2 participants