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

Newline after function-like not preserved #62

Closed
bbannier opened this issue Sep 21, 2023 · 0 comments · Fixed by #64
Closed

Newline after function-like not preserved #62

bbannier opened this issue Sep 21, 2023 · 0 comments · Fixed by #64
Assignees
Labels
bug Something isn't working

Comments

@bbannier
Copy link
Member

bbannier commented Sep 21, 2023

The formatter currently does not preserve newlines after function-like decls (event, function, hook), e.g.,

event zeek_init() {}
# event zeek_init() {}

is formatted as

event zeek_init()
	{ }# event zeek_init() {}

Formatting the output again leads to more reformatting (new space after #) pointing to an idempotency violation (#26),

event zeek_init()
	{ } # event zeek_init() {}

This makes it hard in code where one needs to selectively comment out blocks of code.

@bbannier bbannier added the bug Something isn't working label Sep 21, 2023
bbannier added a commit that referenced this issue Nov 3, 2023
bbannier added a commit that referenced this issue Nov 3, 2023
@bbannier bbannier self-assigned this Nov 3, 2023
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

Successfully merging a pull request may close this issue.

1 participant