Skip to content

Add option to do custom code formatting #147

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

Merged
merged 6 commits into from
Jun 1, 2017
Merged

Conversation

jakemac53
Copy link
Contributor

No description provided.

@jakemac53
Copy link
Contributor Author

Updating this to instead take String formatCode(String generatedCode) argument so you can do whatever you want, including just returning the original string.

@jakemac53 jakemac53 changed the title Add option to not format generated code Add option to do custom code formatting Jun 1, 2017
@jakemac53 jakemac53 merged commit 8116290 into master Jun 1, 2017
@kevmoo kevmoo removed the in progress label Jun 1, 2017
@jakemac53 jakemac53 deleted the add-option-to-not-format branch June 1, 2017 17:55
@natebosch
Copy link
Member

Who is asking for this? Is the motivation a performance improvement?

@jakemac53
Copy link
Contributor Author

The motivation is performance primarily yes. The angular compiler creates some code which dartfmt takes a long time to figure out (hundreds of milliseconds on some real examples).

In that case the solution was to increase the line length, but we opted for a more general solution which allows any custom formatting of code.

mosuem pushed a commit to dart-lang/build that referenced this pull request Dec 10, 2024
mosuem pushed a commit to dart-lang/build that referenced this pull request Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants