fsprojects / fsprojects/FSharpLint
Optional parameters falsely flagged
Open
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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