-
Notifications
You must be signed in to change notification settings - Fork 186
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
Improve formatting for brace_linter()
file
#1825
Conversation
Definitely a subjective choice, but I wonder if you feel the same way; i.e., the formatting in this PR is better and more readable.
Codecov Report
@@ Coverage Diff @@
## main #1825 +/- ##
=======================================
Coverage 98.85% 98.85%
=======================================
Files 112 112
Lines 4801 4814 +13
=======================================
+ Hits 4746 4759 +13
Misses 55 55
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
I'm fine either way but lean towards the HEAD version. any preference @AshesITR ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really see any benefit in the longer version.
Oh, too slow, I accidentally approved. |
I feel strongly about this, though: The indentation here gives the feeling that the arguments to lints <- c(lints, xml_nodes_to_lints(
xml2::xml_find_all(xml, xp_else_same_line),
source_expression = source_expression,
lint_message = "`else` should come on the same line as the previous `}`."
)) The new indentation makes it crystal clear that they are not: lints <- c(
lints,
xml_nodes_to_lints(
xml2::xml_find_all(xml, xp_open_curly),
source_expression = source_expression,
lint_message =
"Opening curly braces should never go on their own line and should always be followed by a new line."
)
) |
Definitely a subjective choice, but I wonder if you feel the same way as I do; i.e., the formatting in this PR is better and more readable.