Skip to content

[Format] Generated files should use project format rules #1304

@EArminjon

Description

@EArminjon

Is your feature request related to a problem? Please describe.
In some projects, we want / need to add inside git our generated files. By default Freezed generated file using DartFormatter() from dart_style package. By default this package use a pageWidth of 80. If your project use a custom value inside the analysis_options.yaml then the generated files will not use the custom value.

Describe the solution you'd like
I would like to see the Freezed automatically detect the right pageWidth used by the project to use it along code generation.

Describe alternatives you've considered
If Freezed can't detect automatically what is the pageWidth of the project, then we can consider adding a new parameter inside build.yaml to expose the parameter.

Additional context
I didn't know if this issue should be address to dart_style package directly.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions