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

fmt: missing linebreak after const decl #20157

Closed
ttytm opened this issue Dec 12, 2023 · 0 comments · Fixed by #20162
Closed

fmt: missing linebreak after const decl #20157

ttytm opened this issue Dec 12, 2023 · 0 comments · Fixed by #20162
Labels
Bug This tag is applied to issues which reports bugs.

Comments

@ttytm
Copy link
Member

ttytm commented Dec 12, 2023

Describe the bug

fmt should add a linebreak after the last const decl

below is formatted

import os

const foo = 'foo'
fn bar() {
	// ...
}
import os

const foo = 'foo' // adding a comment adds a lb

fn bar() {
	// ...
}

Reproduction Steps

format above code

Expected Behavior

lb after last const

Current Behavior

fmt keeps no-lb / behaves inconsistent

Possible Solution

No response

Additional Information/Context

No response

V version

v0.4.3

Environment details (OS name and version, etc.)

linux, amd64

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

@ttytm ttytm added the Bug This tag is applied to issues which reports bugs. label Dec 12, 2023
shove70 added a commit to shove70/v that referenced this issue Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant