fantomas icon indicating copy to clipboard operation
fantomas copied to clipboard

Comment without code after it in the current scope should retain their "parent" indentation

Open MangelMaxime opened this issue 2 years ago • 2 comments

Issue created from fantomas-online

Code

module Test

let generateBinding () =
    if true then
        // Update the Femto metadata
        ()

    // Otherwise, do nothing

Result

module Test

let generateBinding () =
    if true then
        // Update the Femto metadata
        ()

// Otherwise, do nothing

Problem description

Please describe here the Fantomas problem you encountered. Check out our Contribution Guidelines.

Extra information

  • [ ] The formatted result breaks my code.
  • [ ] The formatted result gives compiler warnings.
  • [ ] I or my company would be willing to help fix this.

Options

Fantomas master branch at 2022-05-30T18:11:41Z - 5e927521516445116087af12c76d83e0dec01332

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?

MangelMaxime avatar Jun 02 '22 20:06 MangelMaxime

Hello, this is a known problem. I would most welcome a fix for this, alas it is not an easy problem to tackle. Are you invested in submitting a PR for this?

nojaf avatar Jun 03 '22 07:06 nojaf

Hello @nojaf, I can't really invest the time needed for submitting a PR, I don't have the time for that right now.

MangelMaxime avatar Jun 09 '22 12:06 MangelMaxime