> On Jun 17, 2016, at 9:46 AM, James Peach <jpe...@apache.org> wrote:
> 
>> 
>> On Jun 16, 2016, at 2:04 PM, Leif Hedstrom <zw...@apache.org> wrote:
>> 
>> Hi all,
>> 
>> James and I would like to make this small, but powerful, change to 
>> clang-format:
>> 
>>      -AlignConsecutiveAssignments: false
>>       +AlignConsecutiveAssignments: true
>> 
>> 
>> This will try to align assignments such that the = signs line up. E.g.
>> 
>> enum {
>> XHEADER_X_CACHE_KEY  = 0x0004u,
>> XHEADER_X_MILESTONES = 0x0008u,
>> XHEADER_X_CACHE      = 0x0010u,
>> XHEADER_X_GENERATION = 0x0020u,
>> XHEADER_X_TXN_UUID   = 0x0040u,
>> };
> 
> +1 from me.



I have committed this. One side effect of this is that all PR’s likely will 
have to be updated with a new “make clang-format”.

Cheers,

— leif

P.s
One thing to be aware of, the alignment on the ‘=‘ resets if you have an empty 
line or a comment in the middle of e.g. an enum, or list of assignments in 
general.

Reply via email to