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

Make "// @dart=" version comments affect the applied style. #1600

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

munificent
Copy link
Member

@munificent munificent commented Nov 14, 2024

The formatter uses an incoming language version to control how the formatted code is parsed. The langauge version is also used to determine whether you get the short or tall style.

Prior to this PR, a // @dart= version comment in the formatted code would affect the language version the code is parsed at. But it wouldn't use that comment to determine whether you get the short or tall style. This fixes that.

Fix #1599.

cc @davidmorgan

The formatter uses an incoming language version to control how the
formatted code is parsed. The langauge version is also used to
determine whether you get the short or tall style.

Prior to this PR, a "// @Dart=" version comment in the formatted code
would affect the language version the code is parsed at. But it wouldn't
use that comment to determine whether you get the short or tall style.
This fixes that.

Fix #1599.
@munificent munificent merged commit 6753ab4 into main Nov 14, 2024
7 checks passed
@munificent munificent deleted the version-comment-style branch November 14, 2024 23:06
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.

Language version tag inside file should affect style
2 participants