[libvirt] [PATCH 9/9] Add newline after last entry in VIR_ENUM_IMPL calls

Cole Robinson crobinso at redhat.com
Wed Jan 23 23:26:23 UTC 2019


On 01/23/2019 05:59 PM, Eric Blake wrote:
> On 1/23/19 4:46 PM, Cole Robinson wrote:
>> This is a follow on from a discussion with Andrea here:
>> https://www.redhat.com/archives/libvir-list/2019-January/msg00750.html
>>
>> Most VIR_ENUM_IMPLS look like this:
>>
>> VIR_ENUM_IMPL(XXX, XXX,
>>               "value1",
>>               "value2");
>>
>> But he and I find this format nicer:
>>
>> VIR_ENUM_IMPL(XXX, XXX,
>>               "value1",
>>               "value2",
>> );
> 
> Me too :)
> 
>>
>> The latter format means new enum additions only trigger 1 line of
>> diff, vs 2 for the current common method.
>>
>> Since this patch series is already touching a lot of VIR_ENUM_IMPL
>> endings, now is as good a time as any to widely switch to that
>> format if others agree.
>>
> 
> Do we have a syntax-check rule to enforce the new style?
> 

I didn't attempt one. If there's agreement here I can look into it but
my perl is non-existent and my shell is weak...

Thanks,
Cole




More information about the libvir-list mailing list