fsprojects / fsprojects/FSharpLint

Feature Request: favour typed Async.Ignore

Open
#574 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
F#
Stars
327
Forks
74
PR merge metrics
No merged PRs in 30d

Description

Description

There's already a rule to favor typed ignore instead of the non-typed version,
the same logic is applicable to Async.Ignore, so maybe FSharpLint should
also throw a warning for usage of non-typed Async.Ignore.

Expected behavior
member self.ConnectToDirectory() =
        async {
            return 1
        }

do! self.ConnectToDirectory() |> Async.Ignore

In this sample FSharpLint should throw a warning to ask user
to use typed Async.Ignore like this:

do! self.ConnectToDirectory() |> Async.Ignore<int>

Actual behavior

FSharpLint doesn't throw any warning.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by finding the existing lint rule that favors typed ignore and inspect how its checks and tests are organized. Add equivalent coverage for non-typed Async.Ignore, then verify that the sample usage produces a warning requesting typed Async.Ignore.

Written by the indexing model from the issue text.

Assessment

Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.