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

Request for Auto-Formatting of Generated Code #184

Open
K9i-0 opened this issue Jan 5, 2024 · 1 comment
Open

Request for Auto-Formatting of Generated Code #184

K9i-0 opened this issue Jan 5, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@K9i-0
Copy link

K9i-0 commented Jan 5, 2024

The code generated by slang currently shows differences when formatted with dart format ..

I want it to auto-format like in packages using source_gen, like freezed. They use DartFormatter from the dart_style package. Using DartFormatter the same way should work.
https://pub.dev/packages/dart_style#using-the-dart_style-api

Similar to Issue #163

@K9i-0 K9i-0 added the enhancement New feature or request label Jan 5, 2024
@Tienisto
Copy link
Member

Tienisto commented Jan 19, 2024

Unfortunately, slang is a regular dependency and not a dev dependency. This will also not change in the near future because Translation Overrides reuses most logic from the generator.

A trade-off would be to add this to slang_build_runner but this will make the generated code of dart run slang and dart run build_runner build different / inconsistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants