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

Keep copyInfo for record fixed at starting column #2115

Merged
merged 2 commits into from
Feb 22, 2022

Conversation

dawedawe
Copy link
Member

@dawedawe dawedawe commented Feb 21, 2022

Fixes #2109
As @nojaf suggested, it's fixed by wrapping genExpr() in atCurrentColumnIndent()

…rapping genExpr() in atCurrentColumnIndent() inside of genMultilineRecordInstance()
@@ -5,6 +5,9 @@
### Changed
* Update .NET SDK to 6.0.200. [#2105](https://github.com/fsprojects/fantomas/pull/2105)

### Fixed
Copy link
Contributor

Choose a reason for hiding this comment

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

Really cool to see changelogs entries as part of the PRs :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, well done to have spotted this.

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.

Thanks again @dawedawe!
Really wonderful to see you picking these up!

I have one nitpick about an additional blank line which I'll solve myself as it really really is a nitpick.

@nojaf nojaf changed the title Fix 2109 (Valid input => Formatted content is not valid F# code) Keep copyInfo for record fixed at starting column Feb 22, 2022
@nojaf
Copy link
Contributor

nojaf commented Feb 22, 2022

Please try to add a more meaningful title though.
Valid input, that became invalid code is pretty much the bread and butter of Fantomas bugs.
See https://github.com/fsprojects/fantomas/blob/master/CONTRIBUTING.md#pull-request-title

@nojaf nojaf merged commit ca4488a into fsprojects:master Feb 22, 2022
jindraivanek pushed a commit to jindraivanek/fantomas that referenced this pull request Mar 30, 2022
* Fix 2109 (Valid input => Formatted content is not valid F# code) by wrapping genExpr() in atCurrentColumnIndent() inside of genMultilineRecordInstance()

* Renamed and moved unit test.

Co-authored-by: nojaf <[email protected]>
@dawedawe dawedawe deleted the fix-2109 branch August 25, 2022 21:40
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.

Valid input => Formatted content is not valid F# code
3 participants