Skip to content
This repository was archived by the owner on Mar 13, 2026. It is now read-only.

Make CS4014 an error in app code#231

Draft
ivarne wants to merge 1 commit intomainfrom
ivarne-patch-1
Draft

Make CS4014 an error in app code#231
ivarne wants to merge 1 commit intomainfrom
ivarne-patch-1

Conversation

@ivarne
Copy link
Member

@ivarne ivarne commented Feb 10, 2025

I can't see a good reason when an app would intentionally not await a task, and suppressing the issue is very easy.

CS4014 Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the await operator to the result of the call.

[CS4014](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-messages/cs4014) Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the await operator to the result of the call.

I can't see a good reason when an app would intentionally not await a task, and suppressing the issue is very easy.
@ivarne ivarne requested a review from martinothamar February 10, 2025 18:08
Copy link
Contributor

@martinothamar martinothamar left a comment

Choose a reason for hiding this comment

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

I agree, this is always a bug IMO. Should we use .editorconfig instead though? I feel like the format there is a bit cleaner, and we can include a comment

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants