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

[HTL-1] Place HTL attributes before instead of after other attributes? #202

Open
lukasbeck opened this issue Sep 2, 2020 · 1 comment
Open

Comments

@lukasbeck
Copy link

In the HTL Style Guide by Netcentric there was quite a lengthy discussion about whether HTL attributes should be placed before or after other attributes: Netcentric/aem-htl-style-guide#25

They concluded that they prefer HTL attributes at the front (with various reasons). Does it make sense to update the corresponding rule HTL-1 accordingly?

@toniedzwiedz
Copy link
Collaborator

Hi @lukasbeck, I think it depends on a team's preferred style. A better way to go about it would be to provide another rule and allow users to choose which one to enable in a quality profile. It would be similar to how the Java plugin comes with S1105 (An open curly brace should be located at the end of a line) and S1106 (An open curly brace should be located at the beginning of a line). It's hard to think of a more famous pair of rules in direct opposition to one another :)
Just reversing the behaviour of HTL-1 would be super-frustrating for teams that chose to follow it from day one.

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

2 participants