On Fri, Nov 06, 2015 at 09:23:20AM -0700, Eric Blake wrote:
On 11/06/2015 09:16 AM, Daniel P. Berrange wrote:
>>>
>>> What if we fix the syntax-check instead and allow longer than 80
>>> character lines in case they have no space in it, or exactly one space
>>> (to allow --parameter option,option,option,...)? That would make even
>>> corner cases easier to review, e.g. when you remove or add a parameter
>>> into the long list of parameters.
>>
>
> So if we *never* line wrap within a '-arg value' parameter
> then we would have a fair number of lines longer than 80
> characters.
>
> 314 qemuxml2argv-graphics-spice.args
>
> I didn't realize it was quite so huge with these. With spice
> reaching 314 characters for a single parameter value, I feel
> we really have to artificially split the value strings.
> 314 is just too long for a single line.
Indeed - it makes hunting for the diff within that line difficult when
reading email where the lines are wrapped anyways by the mail client
display.
314 is not as bad as the 998 byte limit where git send-email was choking
and not even sending patches, but it is still too long for comfort, so
I'm okay with making the automatic wrapper pick strategic ',' points to
wrap at on long lines. But we can also compromise, such as perhaps
making the cutoff for mid-word wrapping be at 100 bytes instead of 80 to
touch fewer files.
At any rate, the idea of having 'syntax-check' validate that
auto-wrapping doesn't modify any files seems like a good one.
I've sent a v2 that adds the syntax-check hook. I decided to just
keep it at 80 characters for simplicity rather than allowing larger
special cases.
Regards,
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|