-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Best practice around naming asynchronous methods/functions #517
Comments
knocte
changed the title
Feature: rule to suggest adding a C#-friendly async overloads
Feature: rule to suggest adding C#-friendly async overloads
Oct 19, 2021
su8898
added a commit
to su8898/FSharpLint
that referenced
this issue
Nov 2, 2021
su8898
added a commit
to su8898/FSharpLint
that referenced
this issue
Nov 2, 2021
su8898
added a commit
to su8898/FSharpLint
that referenced
this issue
Nov 3, 2021
su8898
added a commit
to su8898/FSharpLint
that referenced
this issue
Nov 3, 2021
su8898
added a commit
to su8898/FSharpLint
that referenced
this issue
Dec 20, 2021
su8898
added a commit
to su8898/FSharpLint
that referenced
this issue
Dec 20, 2021
su8898
added a commit
to su8898/FSharpLint
that referenced
this issue
Dec 20, 2021
su8898
added a commit
to su8898/FSharpLint
that referenced
this issue
Dec 20, 2021
su8898
added a commit
to su8898/FSharpLint
that referenced
this issue
Dec 20, 2021
su8898
added a commit
to su8898/FSharpLint
that referenced
this issue
Dec 20, 2021
su8898
added a commit
to su8898/FSharpLint
that referenced
this issue
Dec 20, 2021
parhamsaremi
pushed a commit
to parhamsaremi/FSharpLint
that referenced
this issue
Nov 18, 2022
knocte
changed the title
Feature: rule to suggest adding C#-friendly async overloads
Best practice around naming asynchronous methods/functions
Dec 30, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
When dealing with F#-async workflows and exposing these APIs as public, we often forget about our C#-dev friends (that prefer Task-based alternatives, which should be suffixed with "Async").
Now, if there's already a
FooAsync(): Task<'Bar>
method, this rule should also suggest adding F#-friendlyAsyncFoo(): Async<'Bar>
.Testcases
Should give linter warning offering creation of
BarAsync(): Task<int>
.Should not give any linter warnings (because it's not public).
Should not give any linter warnings (because it's not public).
Should not give any linter warnings (because it complies with conventions).
Should give linter warning offering creation of
BarAsync(): Task<int>
and rename Bar to AsyncBar.Should give linter warning offering renaming Bar to AsyncBar.
Should give linter warning offering renaming AsyncBar to Bar.
Should give linter warning offering renaming Bar to BarAsync.
Should give linter warning offering creation of
BarAsync(): Task
(because unit in C# doesn't exist).Should give linter warning offering creation of
BarAsync(): Task
(because unit in C# doesn't exist), and rename Bar to AsyncBar.The text was updated successfully, but these errors were encountered: