Skip to content

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

@bbannier

Description

@bbannier

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions