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

Empty lines after function signature are removed #21644

Closed
TheOnlySilverClaw opened this issue Jun 4, 2024 · 1 comment
Closed

Empty lines after function signature are removed #21644

TheOnlySilverClaw opened this issue Jun 4, 2024 · 1 comment
Labels
Bug This tag is applied to issues which reports bugs.

Comments

@TheOnlySilverClaw
Copy link

TheOnlySilverClaw commented Jun 4, 2024

Describe the bug

v fmt removes manually placed empty lines after function signatures.

Reproduction Steps

Add an empty line after a function signature:

pub fn function_name(x u32, y u32, z u32) {
	
	first_variable := x+ y +z
}

Expected Behavior

The line stays, as in most other places.

Current Behavior

It vanishes with ````v fmt``:

pub fn function_name(x u32, y u32, z u32) {
	first_variable := x + y + z
}

Possible Solution

No response

Additional Information/Context

previously discussed with @medvednikov

V version

0.4.6

Environment details (OS name and version, etc.)

not relevant

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.

@TheOnlySilverClaw TheOnlySilverClaw added the Bug This tag is applied to issues which reports bugs. label Jun 4, 2024
@JalonSolov
Copy link
Contributor

This is correct, and the way v fmt works. It's not a bug.

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

No branches or pull requests

2 participants