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

Annotations on separate lines? #1704

Open
martindamgaardlorensen opened this issue Jun 13, 2024 · 0 comments
Open

Annotations on separate lines? #1704

martindamgaardlorensen opened this issue Jun 13, 2024 · 0 comments

Comments

@martindamgaardlorensen
Copy link
Contributor

martindamgaardlorensen commented Jun 13, 2024

In #1693, I introduced annotations for enums and enum members similar to how it was introduced to class and class properties in #516 and #522. I can however see that with the syntax used now:

{%- template Xxx.Annotations -%}

..., any annotation, usually an attribute like:

[Foo]
[Bar(Baz = 42)]

... will be placed on the same line as the following declaration like:

[Foo]
[Bar(Baz = 42)]public class Bar
{ ... }

I would say the better option would be to have it as:

{%- template Xxx.Annotations %}

... not stripping whitespace from the right side of the expansion.

However, it seems this has changed back and forth in the past, and I am unable to see any reasoning for this - so before making a PR removing the "-" on the right side in all 4 cases of template Xxx.Annotations, I would like to know if there are good reasoning behind having the dash there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant