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

Multiline parentheses objectExpression in indexer expression #2190

Merged

Conversation

janus
Copy link
Contributor

@janus janus commented Apr 5, 2022

Idempotency problem when using lower MaxLineLength than default and fantomas needs to split lines

Fixes #2176

@janus janus changed the title Idempotency problem when using lower MaxLineLength than default and f… Idempotency problem when using lower MaxLineLength than default Apr 5, 2022
Copy link
Contributor

@nojaf nojaf left a comment

Choose a reason for hiding this comment

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

Please add a changelog entry as well.

@@ -2436,3 +2436,42 @@ async {
return model.Prop
}
"""

[<Test>]
let ``Idempotency problem when using lower MaxLineLength than default, 2176`` () =
Copy link
Contributor

Choose a reason for hiding this comment

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

This problem is not related to computation expressions, please move to DotIndexedGetTests.
The test name should not start with an uppercase letter. See https://github.com/fsprojects/fantomas/blob/master/CONTRIBUTING.md#unit-test

The test name itself does also not cover what the problem case is.
Rename to multiline parentheses objectExpression in indexer expression, 2176

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks.

src/Fantomas/CodePrinter.fs Show resolved Hide resolved
@janus janus force-pushed the removeAutoAddedParenInParen-squashed branch from 3f2134e to 043a31f Compare April 6, 2022 05:34
@janus
Copy link
Contributor Author

janus commented Apr 6, 2022

Please add a changelog entry as well.

Thanks. Done.

@nojaf nojaf force-pushed the removeAutoAddedParenInParen-squashed branch from 043a31f to 1c4b15c Compare April 6, 2022 06:57
CHANGELOG.md Outdated Show resolved Hide resolved
@janus janus force-pushed the removeAutoAddedParenInParen-squashed branch from 1c4b15c to 7e95864 Compare April 6, 2022 08:35
Copy link
Contributor

@nojaf nojaf left a comment

Choose a reason for hiding this comment

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

Almost there

CHANGELOG.md Outdated Show resolved Hide resolved
@nojaf nojaf changed the title Idempotency problem when using lower MaxLineLength than default Multiline parentheses objectExpression in indexer expression Apr 6, 2022
@janus janus force-pushed the removeAutoAddedParenInParen-squashed branch from 7e95864 to 4ac7755 Compare April 6, 2022 11:43
Copy link
Contributor

@nojaf nojaf left a comment

Choose a reason for hiding this comment

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

Thank you!

@nojaf nojaf merged commit 5cbe6a3 into fsprojects:master Apr 6, 2022
jindraivanek pushed a commit to jindraivanek/fantomas that referenced this pull request Apr 9, 2022
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.

Idempotency problem when using lower MaxLineLength than default and fantomas needs to split lines
2 participants