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 line before comment should (sometimes) be preserved #91

Open
bbannier opened this issue Nov 14, 2024 · 0 comments
Open

Empty line before comment should (sometimes) be preserved #91

bbannier opened this issue Nov 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@bbannier
Copy link
Member

Currently zeek-format removes empty lines before any minor comments, e.g.,

event new_event(name: string, params: call_argument_vector)
	{
	print name;
	}

# Should preserve empty line before.

first gets formatted to

event new_event(name: string, params: call_argument_vector)
	{
	print name;
	}

	# Should preserve empty line.

and then again (breaking idempotency) to

event new_event(name: string, params: call_argument_vector)
	{
	print name;
	}
	# Should preserve empty line.

I would have expect this to not change formatting at all.

zeek-format should still remove empty after e.g., { (comment first node in block).

Labelling as bug due to idempotency breaking.

@bbannier bbannier added the bug Something isn't working label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant