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

Duplicate ///-comments when immediately preceded by a //-comment #2152

Closed
1 of 3 tasks
baronfel opened this issue Mar 11, 2022 · 1 comment · Fixed by #2153
Closed
1 of 3 tasks

Duplicate ///-comments when immediately preceded by a //-comment #2152

baronfel opened this issue Mar 11, 2022 · 1 comment · Fixed by #2153

Comments

@baronfel
Copy link
Contributor

Issue created from fantomas-online

Code

// Maybe computation expression builder, copied from ExtCore library
/// https://github.com/jack-pappas/ExtCore/blob/master/ExtCore/Control.fs
[<Sealed>]
type MaybeBuilder() = class end

Result

// Maybe computation expression builder, copied from ExtCore library
/// https://github.com/jack-pappas/ExtCore/blob/master/ExtCore/Control.fs
/// https://github.com/jack-pappas/ExtCore/blob/master/ExtCore/Control.fs
/// https://github.com/jack-pappas/ExtCore/blob/master/ExtCore/Control.fs
/// https://github.com/jack-pappas/ExtCore/blob/master/ExtCore/Control.fs
[<Sealed>]
type MaybeBuilder() =
    class
    end

Problem description

Something's causing the ///-comment for the type here to be replicated. In the actual source (FSAC), this comment line was duplicated ~150 times.

It can be worked around by making the //-comment line a ///-comment line instead, which preserves the correct behavior.

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 branch at 2022-03-11T15:23:45Z - 1531c68

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?

@nojaf
Copy link
Contributor

nojaf commented Mar 12, 2022

Hey Chet, thanks for raising this issue.
I want to follow up shortly on all the XML document problems so I released https://www.nuget.org/packages/fantomas-tool/4.7.3.

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