You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
WrapExpensiveLogStatementsInConditionals not to offer wrapping lines which just retrieve some properties #232
Avoid noise. Currently WrapExpensiveLogStatementsInConditionals tends to offer excessive changes in some cases. I know it's hard to come up with good rules on what constitutes a heavy operation worth wrapping in an if and what doesn't.
But I still think the logic could be tuned a bit better with some heuristics.
Maybe skip wrapping if all method calls in the expression are getters?
(which I know they could be expensive operations, but in most of the cases they are not)
I'd put it as a default. The current behavior doesn't seem like it would attract a huge horde of fans, so no need to keep it as an option going forward, if you ask me.
Activity
pdelagrave commentedon Jul 7, 2025
@timtebeek
@greg-at-moderne
Should that feature be put behind a boolean
@Optionor we just make it the new default behavior?greg-at-moderne commentedon Jul 7, 2025
I'd put it as a default. The current behavior doesn't seem like it would attract a huge horde of fans, so no need to keep it as an option going forward, if you ask me.