ccode-formattingastyle

How to "unbreak" C code with "Artistic Style"


With Artistic Style code formatter, how do I achieve the opposite of --break-after-logical / -xL such that if I have...

if (thisVariable1 == thatVariable1
        || thisVariable2 == thatVariable2
        || thisVariable3 == thatVariable3)
    ...

...I get...

if (thisVariable1 == thatVariable1 || thisVariable2 == thatVariable2 || thisVariable3 == thatVariable3)
    ...

Solution

  • Artistic style doesn't appear to make this possible.

    That's quite sensible, since it actually obfuscates the code :

    I would actually write :

    if  (  thisVariable1   == thatVariable1
        || thisVariable2   == thatVariable2
        || longerVariable3 == thatVariable3 )
        ...