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

Allow linewidth and indent to be given to erl_pp #2443

Merged
merged 1 commit into from
Nov 6, 2019

Conversation

josevalim
Copy link
Contributor

This gives a bit of flexibility and control to the
formatted code. For example, Erlang official docs
uses 3 spaces when indenting types, with this patch
we can reproduce this effect elsewhere.

This gives a bit of flexibility and control to the
formatted code. For example, Erlang official docs
uses 3 spaces when indenting types, with this patch
we can reproduce this effect elsewhere.
@josevalim
Copy link
Contributor Author

Although the changes look large, they are quite straight-forward. I replaced the users of ?MAXLINE by PP#pp.linewidth and ?IND by PP#pp.indent. Nothing else was changed.

Also note I picked the name linewidth to mirror erl_prettypr.

@uabboli uabboli added the team:VM Assigned to OTP team VM label Nov 1, 2019
@uabboli uabboli self-assigned this Nov 1, 2019
@uabboli uabboli added the testing currently being tested, tag is used by OTP internal CI label Nov 4, 2019
@uabboli
Copy link
Contributor

uabboli commented Nov 6, 2019

Thanks, looks good.

@uabboli uabboli merged commit b42572e into erlang:master Nov 6, 2019
@uabboli uabboli removed the testing currently being tested, tag is used by OTP internal CI label Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:VM Assigned to OTP team VM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants