qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] scripts/checkpatch.pl: Modify the line length limit of the c


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] scripts/checkpatch.pl: Modify the line length limit of the code
Date: Fri, 6 Nov 2020 15:49:26 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1

On 11/6/20 3:16 PM, Peter Maydell wrote:
> On Fri, 6 Nov 2020 at 14:08, Philippe Mathieu-Daudé <philmd@redhat.com> wrote:
>> Can we keep the error please? Maybe 132 is the next display logical
>> limit once we increased the warning from 80 to 100.
>>
>> I understand hardware evolved, we have larger displays with better
>> resolution and can fit more characters in a line.
>> I am a bit wary however functions become heavier (more code into
>> a single function). Maybe this checkpatch change should go with
>> a another one warning when a function has more than 80 lines,
>> excluding comments? (Even 80 is too much for my taste).
> 
> Personally I just don't think checkpatch should be nudging people
> into folding 85-character lines, especially when there are
> multiple very similar lines in a row and only one would get
> folded, eg the prototypes in target/arm/helper.h -- some of
> these just edge beyond 80 characters and I think wrapping them
> is clearly worse for readability. If we don't want people
> sending us "style fix" patches which wrap >80 char lines
> (which I think we do not) then we shouldn't have checkpatch
> complain about them, because if it does then that's what we get.

I think I was not clear. I am not arguing against changing the *length*
limit of a line (although I'd still keep one, as I don't think we want
lines with 500 characters). I'm suggesting an orthogonal change,
restricting the number of lines in a function :)

> 
> thanks
> -- PMM
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]