Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions