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

Doc comments separated inconsistently from definitions in interfaces #1929

Closed
hcarty opened this issue May 16, 2018 · 1 comment
Closed

Doc comments separated inconsistently from definitions in interfaces #1929

hcarty opened this issue May 16, 2018 · 1 comment

Comments

@hcarty
Copy link
Contributor

hcarty commented May 16, 2018

When reformatting a doc comment attached to a value's type in an interface (.rei), refmt from the current master branch adds unwanted whitespace between the comment and the definition if the definition wraps. Otherwise there is no whitespace added between the comment and definition.

The following is the output from refmt, even if the empty line between the first doc comment and let some_definition is removed:

/** Hi I'm a doc comment for some_definition */

let some_definition:
  (
    ~what_a_long_label: M.its_a_type,
    ~just_need_to_make_this: long_enough_to_wrap
  ) =>
  unit;

/** Hi I'm a doc comment for another_definition */
let another_definition: unit => unit;

I'd personally prefer no empty line between the doc comment and definition, but in any case it would be nice if the spacing did not depend on the length/wrapping of the value definition.

@IwanKaramazow
Copy link
Contributor

This is a bug, submitted a patch.

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

No branches or pull requests

2 participants