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

Idempotency problem when ending with a comment #1649

Closed
3 tasks
Smaug123 opened this issue Apr 15, 2021 · 0 comments · Fixed by #1656
Closed
3 tasks

Idempotency problem when ending with a comment #1649

Smaug123 opened this issue Apr 15, 2021 · 0 comments · Fixed by #1656

Comments

@Smaug123
Copy link
Contributor

Issue created from fantomas-online

Formatted code

#load "Hi.fsx"
open Something

//// FOO
[ 1 ; 2 ; 3 ]
//// The end

Reformatted code

#load "Hi.fsx"
open Something

//// FOO
[ 1 ; 2 ; 3 ]
//// The end

Problem description

This was an FSX file. Fantomas couldn't decide how many newlines to put on the end.

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 04/14/2021 13:41:07 - e164e23

    { config with
                SpaceBeforeUppercaseInvocation = true
                SpaceBeforeClassConstructor = true
                SpaceBeforeMember = true
                SpaceBeforeColon = true
                SpaceBeforeSemicolon = true
                MultilineBlockBracketsOnSameColumn = true
                NewlineBetweenTypeDefinitionAndMembers = true
                KeepIfThenInSameLine = true
                AlignFunctionSignatureToIndentation = true
                AlternativeLongMemberDefinitions = true
                MultiLineLambdaClosingNewline = true
                KeepIndentInBranch = true }

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

nojaf added a commit to nojaf/fantomas that referenced this issue Apr 16, 2021
nojaf added a commit to nojaf/fantomas that referenced this issue Apr 17, 2021
nojaf added a commit to nojaf/fantomas that referenced this issue Apr 20, 2021
nojaf added a commit to nojaf/fantomas that referenced this issue Apr 21, 2021
nojaf added a commit to nojaf/fantomas that referenced this issue Apr 21, 2021
nojaf added a commit to nojaf/fantomas that referenced this issue Apr 21, 2021
nojaf added a commit to nojaf/fantomas that referenced this issue Apr 23, 2021
nojaf added a commit to nojaf/fantomas that referenced this issue Apr 26, 2021
nojaf added a commit that referenced this issue Apr 26, 2021
* Don't use module or namespace as trivia candidate. Fixes #1649.

* Renamed unit test.

* Reimplement colWithNlnWhenItemIsMultiline by including check for trailing trivia.

* Check in recently added items in Queue if expression was multiline.

* Correct renamed in CodePrinter
nojaf added a commit to nojaf/fantomas that referenced this issue Apr 26, 2021
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.

2 participants