fsprojects / fsprojects/FSharpLint

Optional parameters falsely flagged

Open
#328 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Warnings are thrown for optional bool parameters

`x = true` might be able to be refactored into `x`.
silentHttpErrors = true

https://github.com/fsharp/FSharp.Data/blob/master/src/Net/Http.fs#L1704

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 with the example in src/Net/Http.fs around line 1704 and reproduce the warning for the optional bool parameter silentHttpErrors. Trace the lint rule that suggests simplifying x = true, then inspect existing tests for optional-parameter handling if available. Done means the false warning is removed without suppressing valid refactoring warnings.

Written by the indexing model from the issue text.

Assessment

Tech stack
fsharp
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.