Skip to content

Conversation

koji-1009
Copy link

close #1518

Added the comments // dart format off and // dart format on to the code generated using defaultFormatOutput.
With this fix, additional formatting will no longer be applied to the generated code even if the project's page_width setting is not 80.

ref dart-lang/build#3812 (comment)
ref dart-lang/build#3887 (comment)

@davidmorgan
Copy link
Collaborator

FWIW I don't think this is something individual generators should do; it should be handled by build_runner.

@kevmoo
Copy link
Collaborator

kevmoo commented Aug 26, 2025

Interesting idea, but I think this should be a feature added at either pkg:build and friends or at least pkg:source_gen

@kevmoo kevmoo closed this Aug 26, 2025
@koji-1009
Copy link
Author

Thanks for the review. OK, I'll wait for this feature to be added to pkg:build and friends.

@koji-1009 koji-1009 deleted the feat/format_comment branch August 26, 2025 21:36
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.

The page_width option in the analysis_options.yaml is ignored
3 participants