Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DotGet inside If expression not correct on second format. #1329

Closed
3 tasks
nojaf opened this issue Dec 23, 2020 · 0 comments · Fixed by #1330
Closed
3 tasks

DotGet inside If expression not correct on second format. #1329

nojaf opened this issue Dec 23, 2020 · 0 comments · Fixed by #1330

Comments

@nojaf
Copy link
Contributor

nojaf commented Dec 23, 2020

Issue created from fantomas-online

Code

let private tryGetUrlWithExactMatch (pathPattern: string<SourcelinkPattern>) (urlPattern: string<Url>) (document: Document) =
    if (UMX.untag pathPattern).Equals(UMX.untag document.Name, System.StringComparison.Ordinal)
    then Some (urlPattern, normalizeRepoPath (UMX.cast<SourcelinkPattern, RepoPathSegment> pathPattern), document) else None

let private tryGetUrlWithExactMatch
  (pathPattern: string<SourcelinkPattern>)
  (urlPattern: string<Url>)
  (document: Document)
  =
  if ((UMX.untag pathPattern)
        .Equals(UMX.untag document.Name, System.StringComparison.Ordinal)) then
    Some(urlPattern, normalizeRepoPath (UMX.cast<SourcelinkPattern, RepoPathSegment> pathPattern), document)
  else
    None

Result

let private tryGetUrlWithExactMatch
  (pathPattern: string<SourcelinkPattern>)
  (urlPattern: string<Url>)
  (document: Document)
  =
  if ((UMX.untag pathPattern)
        .Equals(UMX.untag document.Name, System.StringComparison.Ordinal)) then
    Some(urlPattern, normalizeRepoPath (UMX.cast<SourcelinkPattern, RepoPathSegment> pathPattern), document)
  else
    None

let private tryGetUrlWithExactMatch
  (pathPattern: string<SourcelinkPattern>)
  (urlPattern: string<Url>)
  (document: Document)
  =
  if ((UMX.untag pathPattern)
    .Equals(UMX.untag document.Name, System.StringComparison.Ordinal)) then
    Some(urlPattern, normalizeRepoPath (UMX.cast<SourcelinkPattern, RepoPathSegment> pathPattern), document)
  else
    None

Problem description

The .Equals should be indented further.

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 12/23/2020 13:54:44 - 6695a60

    { config with
                IndentSize = 2 }

Did you know that you can ignore files when formatting from fantomas-tool or the FAKE targets by using a .fantomasignore file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant