[cfe-dev] Clang-format penalty style options

Adam Cieszkiel via cfe-dev cfe-dev at lists.llvm.org
Thu Aug 17 07:46:46 PDT 2017


Hello,

I have been using clang-format for some time now and I am happy about its
results.
However, in some case I wanted to improve a little its behavior and I
believe I could do it by penalty style options: 'Penalty*'.

Unfortunately, the descriptions of them in the documentation is
pretty vague and I am not really sure how to adjust them to meet the
expectations. I usually do it in a 'hit-or-miss' manner.

Could you please enlighten me a little what this 'unsigned integer' means
as the argument in those options. I would be really pleasant to understand
them better:

PenaltyBreakAssignment (unsigned)
PenaltyBreakBeforeFirstCallParameter (unsigned)
PenaltyBreakComment (unsigned)
PenaltyBreakFirstLessLess (unsigned)
PenaltyBreakString (unsigned)
PenaltyExcessCharacter (unsigned)
PenaltyReturnTypeOnItsOwnLine (unsigned)

Thank you a lot in advance.

Best regards,
Adam.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170817/81536586/attachment.html>


More information about the cfe-dev mailing list