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

Formatting edoc elements #176

Closed
paulo-ferraz-oliveira opened this issue Sep 21, 2020 · 2 comments
Closed

Formatting edoc elements #176

paulo-ferraz-oliveira opened this issue Sep 21, 2020 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@paulo-ferraz-oliveira
Copy link

I usually write %% @private between a function's -spec(_). and its declaration, like so:

-spec add(A :: integer(), B :: integer()) -> integer().
%% @private
add(A, B) ->

erlfmt prefers it like

-spec add(A :: integer(), B :: integer()) -> integer().
    %% @private
add(A, B) ->

OTP code has pretty much no occurrences of %% @private, but some %% @private.

Should, generically speaking, %% @ be an exception to "comments"?

@paulo-ferraz-oliveira
Copy link
Author

paulo-ferraz-oliveira commented Sep 21, 2020

Oh, if %% @private is before -spec(_). the "issue" doesn't happen.

@awalterschulze
Copy link
Contributor

awalterschulze commented Sep 22, 2020

This seems similar to a problem we have discovered before #94
I hope it is okay, if I close this and merge it in that issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants