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

A space was added before paren lambda argument #2041

Closed
3 tasks
nojaf opened this issue Jan 27, 2022 · 0 comments · Fixed by #2232
Closed
3 tasks

A space was added before paren lambda argument #2041

nojaf opened this issue Jan 27, 2022 · 0 comments · Fixed by #2232

Comments

@nojaf
Copy link
Contributor

nojaf commented Jan 27, 2022

Issue created from fantomas-online

Code

    Task.Run<CommandResult>(fun () ->
      // long
      // comment
      task)
    |> ignore<Task<CommandResult>>

    Task.Run<CommandResult> (task)
    |> ignore<Task<CommandResult>>

Result

Task.Run<CommandResult> (fun () ->
    // long
    // comment
    task)
|> ignore<Task<CommandResult>>

Task.Run<CommandResult>(task)
|> ignore<Task<CommandResult>>

Problem description

I don't think there should be an extra space here.

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 branch at 1/1/1990

Default Fantomas configuration

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

dawedawe added a commit to dawedawe/fantomas that referenced this issue May 12, 2022
- adjust tests
- add back test for fsprojects#2041
- add back CHANGELOG entry about fsprojects#2041
nojaf pushed a commit to dawedawe/fantomas that referenced this issue May 13, 2022
- adjust tests
- add back test for fsprojects#2041
- add back CHANGELOG entry about fsprojects#2041
nojaf pushed a commit that referenced this issue May 13, 2022
* - Be more cautious when adding a sepSpace before paren lambda
- Fixes 2041 and 2231
- Adjust expected results of other tests

* - Add new ap DotGetAppWithLambda in SourceParser.fs
- Move logic of AppWithLambda to genAppWithLambda function
- narrow scope down to just fix 2231

* Improve addition of SynLongIdent in genAppWithLambda()

* adjust CHANGELOG.md entry to smaller scope of PR

* - refactor genAppWithLambda()
- adjust tests
- add back test for #2041
- add back CHANGELOG entry about #2041

* - Fix typo
- Remove superfluous indent
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