You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
letgetDefaultProxyFor=
memoize
(fun(url:string)->leturi= Uri url
letgetDefault()=#if CUSTOM_WEBPROXY
letresult={new IWebProxy withmember__.Credentials
with get ()=nulland set _value =()member__.GetProxy _=nullmember__.IsBypassed (_host : Uri)=true}#elseletresult= WebRequest.GetSystemWebProxy()#endif#if CUSTOM_WEBPROXY
letproxy= result
#elseletaddress= result.GetProxy uri
if address = uri thennullelseletproxy= WebProxy address
proxy.BypassProxyOnLocal <-true#endif
proxy.Credentials <- CredentialCache.DefaultCredentials
proxy
match calcEnvProxies.Force().TryFind uri.Scheme with| Some p ->if p.GetProxy uri <> uri then p else getDefault()| None -> getDefault())
Error
Fantomas was able to format the code but the result appears to be invalid F# code.
Please openan issue.
Formatted result:letgetDefaultProxyFor=
memoize (fun(url: string)->leturi= Uri url
letgetDefault()=#if CUSTOM_WEBPROXY
letresult={new IWebProxy withmember__.Credentials
with get ()=nulland set _value =()member__.GetProxy _=nullmember__.IsBypassed(_host: Uri)=true}#elseletresult= WebRequest.GetSystemWebProxy()#endif#if CUSTOM_WEBPROXY
letproxy= result
#elseletaddress= result.GetProxy uri
if address = uri thennullelseletproxy= WebProxy address
proxy.BypassProxyOnLocal <-true#endif
proxy.Credentials <- CredentialCache.DefaultCredentials
proxy
match calcEnvProxies.Force().TryFind uri.Scheme with| Some p ->if p.GetProxy uri <> uri then p else getDefault ()| None -> getDefault ())
Problem description
I think Steve reported this issue as well, this is a smaller sample to work with.
For some reason, the match block is not properly indented.
Extra information
The formatted result breaks by code.
The formatted result gives compiler warnings.
I or my company would be willing to help fix this.
Options
Fantomas Master at 8/21/2020
Default Fantomas configuration
The text was updated successfully, but these errors were encountered:
nojaf
added a commit
to nojaf/fantomas
that referenced
this issue
Sep 2, 2020
Issue created from fantomas-online
Code
Error
Problem description
I think Steve reported this issue as well, this is a smaller sample to work with.
For some reason, the match block is not properly indented.
Extra information
Options
Fantomas Master at 8/21/2020
Default Fantomas configuration
The text was updated successfully, but these errors were encountered: