--pad-oper does not pad Logical Negation (NOT) for example:
if (!isFoo(bar)){}
if (!(isFoo(bar))){}
would be expected to be reformatted as:
if (! isFoo(bar)){}
if (! (isFoo(bar))){}
But instead does nothing.
I feel the later is easier to read as the NOT is more visible.
If this is not the intended behaviour of --pad-oper I would request a new command to split it, possible --pad-negation.
The next release will have --pad-negation
Will
--pad-negationbe just a flag or will we have different settings to get!,_!,!_, or_!_... I admit this might be overkill ...Last edit: w-peuker 2024-06-03
The original request in my organisation was for the
_!_example, so settings might be nice.The new version 3.5 has two options
--pad-negationand--pad-negation=beforeto toggle space before !. The options always add a space after.Last edit: André Simon 2024-06-06
Thanks! That was so quick from report to response to release.
Hope you have some cake today :-)