style: Use builtin functions without parentheses consistently#7076
style: Use builtin functions without parentheses consistently#7076perlpunk merged 1 commit intoos-autoinst:masterfrom
Conversation
This can be ensured later with a perlcritic rule. There is no perlcriric rule that I know of that can ensure the opposite, so we can only choose to ensure no parentheses, or leave it inconsistently.
bca0875 to
38b8014
Compare
|
We could ensure this already now by adding |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #7076 +/- ##
=======================================
Coverage 99.72% 99.72%
=======================================
Files 416 416
Lines 42979 42979
=======================================
Hits 42859 42859
Misses 120 120 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Added not-ready to give more people the chance to review |
|
Should I leave out the 5 uncovered lines for now? |
I guess we want to enable strict enforced rules so we should use the changes everywhere. At best we provide test coverage for those missing lines as after all we are "nearly there" to have everything covered. Alternatively we force-merge with missing coverage as we can trust that no functional changes are introduced if we focus on changing the style only. |
To me the lines look harmless enough to force-merge. But we could also change them back and mark them with But in general I think it would be good to merge this as soon as we voted for it. |
|
No objections from anyone. Merging manually - the patched lines don't look like they could break anything |
This can be ensured later with a perlcritic rule.
There is no perlcritic rule that I know of that can ensure the opposite, so we can only choose to ensure no parentheses, or leave it inconsistently.
I personally find it more readable without parens.
There are some cases where it is or can seem ambiguous, or where it would do the wrong thing, so I suggest to use parentheses around the fuction call instead:
See also
Let me know what you think.