FSharpLint
FSharpLint copied to clipboard
Optional parameters falsely flagged
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
Hi @Shmew, thanks for the bug report. When you get a chance, could you please provide a minimum example that reproduces this issue?
module Example
open FSharp.Data
let test () =
let uri = @"https://petstore.swagger.io/v2/pet/findByStatus?status=available"
let heads =
[ HttpRequestHeaders.ContentLanguage HttpContentTypes.Json
HttpRequestHeaders.Accept @"*/*"
HttpRequestHeaders.AcceptEncoding "UTF8"
HttpRequestHeaders.ContentType HttpContentTypes.Json
HttpRequestHeaders.ContentEncoding "UTF8" ]
Http.Request(uri, httpMethod = "GET", headers = heads, silentHttpErrors = true)
========== Linting .\Example.fs ==========
`x = true` might be able to be refactored into `x`.
Error in file .\Example.fs on line 14 starting at column 59
Http.Request(uri, httpMethod = "GET", headers = heads, silentHttpErrors = true)
^
--------------------------------------------------------------------------------
========== Finished: 1 warnings ==========
========== Summary: 1 warnings ==========
Hey @jgardella sorry for taking so long, I forgot about this.