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

Use smithy official formatter #139

Closed

Conversation

daddykotex
Copy link
Contributor

Issue #, if available:

N/A

Description of changes:

We've implemented support for formatting via the formatter in smithy-translate but now that the official formatter is out, there is no reason not to use it.

In my own tests, the official formatter produce different results but it is more consistent. Our modeling of the AST is wrong when it comes to whitespaces and as such we produce poorly formatted files when comments are extensively used. For example, this recent issue highlight a simple snippet that is poorly formatted. The official formatter does the correct thing here.

I'd be happy to add some tests if you like this PR. Feel free to push changes to this PR if you want to do it.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@milesziemer
Copy link
Contributor

Done in #146

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

Successfully merging this pull request may close these issues.

2 participants