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

Style guide lambda #1858

Merged
merged 5 commits into from
Sep 7, 2021
Merged

Style guide lambda #1858

merged 5 commits into from
Sep 7, 2021

Conversation

nojaf
Copy link
Contributor

@nojaf nojaf commented Aug 8, 2021

Hi @dsyme, in order to follow up on dotnet/docs#25207, I've implemented the change in Fantomas to have a better idea of what the impact would be.

I'll explain the high-level gist of the implementation and perhaps you confirm if I understood the guidance correctly.
So, firstly I believe the guidance was focused around function applications where a lambda (be it SynExpr.Lambda or SynExpr.MatchLambda) is the last argument.

I've captured the nested SynExpr.App in an active pattern (|AppWithLambda|_|) and applied new logic to that exact shape of SynExpr.
First, if the expression is short, we try to put it in one line.

functionName arg1 arg2 arg3 (fun arg4 -> bodyExpr)

If the max_line_length is crossed or the body is multiline, we apply alternative formatting.
There, we first check if the function name and arguments until the arrow of the lambda fit on the remainder of the line.

So imagine something like:

functionName arg1 arg2 arg3 (fun arg4 ->

If this all still fits on the current line, we write it as such and indent the body one level on the next line.

functionName arg1 arg2 arg3 (fun arg4 ->
    bodyExpr)

In case this doesn't fit all argument go on the next line with one level of indent:

functionName 
    arg1 
    arg2 
    arg3 
    (fun arg4 ->
        bodyExpr)

This makes a lot of sense to me, especially when arg1, arg2 or arg3 are multiline themselves.

In case the last argument is SynExpr.MatchLambda we try the same thing:

functionName arg1 arg2 arg3 (function
    | Choice1of2 x
    | Choice2of2 y)

Or if the max_line_length is crossed:

functionName 
    arg1 
    arg2 
    arg3 
    (function
     | Choice1of2 x
     | Choice2of2 y)

Notice there is no extra indent on the line after the function keyword, the clauses do align with the function keyword.

If you look at the implementation, you will see the MultiLineLambdaClosingNewline setting.
This is to cope with the GR style guide, as they do things differently with lambdas.
So, don't mind that 😊.

Let me know what you think, it would be a great help if you could take a look at the expected results in the unit tests.
Thanks in advance!

Copy link
Contributor

@dsyme dsyme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked through the test cases and in almost every case it looks like an improvement to me.

src/Fantomas.Tests/LambdaTests.fs Show resolved Hide resolved
src/Fantomas.Tests/LetBindingTests.fs Show resolved Hide resolved
@nojaf
Copy link
Contributor Author

nojaf commented Aug 11, 2021

Thanks Don!

@nojaf nojaf marked this pull request as ready for review August 26, 2021 14:03
@nojaf nojaf linked an issue Aug 26, 2021 that may be closed by this pull request
3 tasks
@nojaf nojaf changed the title Style guide lambda POC Style guide lambda Aug 26, 2021
@nojaf nojaf mentioned this pull request Sep 6, 2021
8 tasks
@dsyme
Copy link
Contributor

dsyme commented Sep 7, 2021

@nojaf Should we merge this? Thanks

@nojaf
Copy link
Contributor Author

nojaf commented Sep 7, 2021

Yes, I've been on holiday for some time so that is the reason why this is has been lingering a bit.
The goal is to release this soon as alpha and update the online tool to target the 4.6 branch for the prerelease mode.

One thing that somewhat puzzles me is the disappearance of the FCS 40 prerelease. It is unlisted on NuGet.
Any ideas on that @dsyme? See dotnet/fsharp#11926

@nojaf nojaf merged commit c27ba05 into fsprojects:4.6 Sep 7, 2021
@nojaf nojaf deleted the style-guide-lambda branch September 7, 2021 13:25
@dsyme
Copy link
Contributor

dsyme commented Sep 7, 2021

@nojaf Am asking @KevinRansom about the disappearence of the pre-release

nojaf added a commit that referenced this pull request Sep 7, 2021
* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda
@KevinRansom
Copy link

KevinRansom commented Sep 7, 2021

Sorry, I unlisted it by mistake, there are some we mean to list, and some we don't mean to list and because it's hard to tell which set something belongs to I unlisted it.

However, we have decided to eliminate the need to ship unlisted FSharp.Compiler.Service packages, so from now now on the listing status shouldn't change.

Sorry about the inconvenience, and thanks for pointing it out.

Kevin

nojaf added a commit that referenced this pull request Sep 10, 2021
* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda
nojaf added a commit that referenced this pull request Sep 16, 2021
* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda
nojaf added a commit that referenced this pull request Sep 22, 2021
* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda
nojaf added a commit that referenced this pull request Sep 27, 2021
* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda
nojaf added a commit that referenced this pull request Sep 29, 2021
* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda
nojaf added a commit that referenced this pull request Nov 2, 2021
* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda
nojaf added a commit that referenced this pull request Nov 2, 2021
* Style guide lambda (#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
nojaf added a commit that referenced this pull request Nov 3, 2021
* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda
nojaf added a commit that referenced this pull request Nov 3, 2021
* Style guide lambda (#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
nojaf added a commit that referenced this pull request Nov 7, 2021
* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda
nojaf added a commit that referenced this pull request Nov 7, 2021
* Style guide lambda (#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
nojaf added a commit that referenced this pull request Nov 9, 2021
* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda
nojaf added a commit that referenced this pull request Nov 9, 2021
* Style guide lambda (#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
nojaf added a commit that referenced this pull request Nov 10, 2021
* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda
nojaf added a commit that referenced this pull request Nov 10, 2021
* Style guide lambda (#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
nojaf added a commit that referenced this pull request Nov 19, 2021
* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda
nojaf added a commit that referenced this pull request Nov 19, 2021
* Style guide lambda (#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
nojaf added a commit that referenced this pull request Nov 24, 2021
* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda
nojaf added a commit that referenced this pull request Nov 24, 2021
* Style guide lambda (#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
nojaf added a commit that referenced this pull request Dec 4, 2021
* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda
nojaf added a commit that referenced this pull request Dec 4, 2021
* Style guide lambda (#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
nojaf added a commit that referenced this pull request Dec 29, 2021
* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda
nojaf added a commit that referenced this pull request Dec 29, 2021
* Style guide lambda (#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
nojaf added a commit that referenced this pull request Jan 7, 2022
* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda
nojaf added a commit that referenced this pull request Jan 7, 2022
* Style guide lambda (#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
nojaf added a commit that referenced this pull request Jan 8, 2022
* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda
nojaf added a commit that referenced this pull request Jan 8, 2022
* Style guide lambda (#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
nojaf added a commit that referenced this pull request Jan 8, 2022
* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda
nojaf added a commit that referenced this pull request Jan 8, 2022
* Style guide lambda (#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
nojaf added a commit that referenced this pull request Jan 14, 2022
* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda
nojaf added a commit that referenced this pull request Jan 14, 2022
* Style guide lambda (#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
nojaf added a commit that referenced this pull request Jan 14, 2022
* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda
nojaf added a commit that referenced this pull request Jan 14, 2022
* Style guide lambda (#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
jindraivanek pushed a commit to jindraivanek/fantomas that referenced this pull request Mar 30, 2022
* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda
jindraivanek pushed a commit to jindraivanek/fantomas that referenced this pull request Mar 30, 2022
* Style guide lambda (fsprojects#1858)

* WIP lambda as last argument

* Update remaining test according to style proposal.

* Add test for multiline non lambda argument.

* Print trivia for function keyword from ast range.

* multiline non lambda argument, match lambda

* WIP Daemon service contract.

* Early working daemon prototype.

* Take .editorconfig settings into account.

* Fix current build.

* Add Fantomas locator.

* Found globally installed Fantomas version.

* Remove unused function.

* Add formatSelection.

* Refactor FormatDocumentResponse to DU.

* Remove unused LspTypes dependency.

* Update FCS in Daemon

* Refactored public api of FantomasService.

* Don't pass full exception in FormatDocumentResponse.

* Use separate versioning for Fantomas.Client.

* FantomasService manages multiple daemon versions.

* Fully implement FantomasService.

* Return configuration as json.

* Validate if filePath in request is absolute.

* Ignore first three 4.6 alphas as compatible tools.

* Find ignore file from current file path.

* Remove safeFileName from CodeFormatterImpl.fs.
Disable daemon tests.

* Add daemon unit tests.

* Update help text for daemon mode.

* Add documentation for Fantomas daemon mode.

* Initial attempt at adding source links.

* Set DebugType to embedded.

* Bump Fantomas.Client to 0.3.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update style of lambda argument
3 participants