[webkit-dev] Removal of trailing whitespace

Chris Dumez cdumez at apple.com
Wed Apr 12 12:34:40 PDT 2023



> On Apr 12, 2023, at 10:23 AM, Ryosuke Niwa via webkit-dev <webkit-dev at lists.webkit.org> wrote:
> 
> Yeah, enforcing that new or otherwise modified lines don’t have trailing whitespaces would be good.

Yes, I wouldn’t mind that either.

However, https://commits.webkit.org/262879@main has just landed and if you look at the changes to Document.cpp, it is mostly spacing changes :(
It makes it harder to review or to identify meaningful changes in a patch after landing. It also pollutes git blame for no great reason.

> 
> - R. Niwa
> 
>> On Apr 12, 2023, at 10:20 AM, Yusuke Suzuki <ysuzuki at apple.com> wrote:
>> 
>> I agree that we should not do it because it pollutes change history of files, git-blame results, and review-diff in PR.
>> But at the same time, I think there is no reason to add a new trailing whitespace via a new commit.
>> It is nice if we can enforce this rule only for newly added code (via style-checker) not to add new trailing spaces.
>> 
>> -Yusuke
>> 
>>> On Apr 12, 2023, at 10:08 AM, Ryosuke Niwa via webkit-dev <webkit-dev at lists.webkit.org> wrote:
>>> 
>>> WebKi proejctt’s long term policy has been to not do this:
>>> https://lists.webkit.org/pipermail/webkit-dev/2009-August/009665.html
>>> 
>>> I don’t think we should change that.
>>> 
>>> - R. Niwa
>>> 
>>>> On Apr 12, 2023, at 9:17 AM, Chris Dumez via webkit-dev <webkit-dev at lists.webkit.org> wrote:
>>>> 
>>>> I am against this because it adds a lot of noise to patches I am trying to review.
>>>> I have seen PRs where white space changes account for more than half the patch I am trying to review.
>>>> 
>>>> Dropping trailing spaces on the lines you’re modifying is OK but in the whole file is too noisy IMO.
>>>> 
>>>> Chris.
>>>> 
>>>>> On Apr 12, 2023, at 1:22 AM, Anne van Kesteren via webkit-dev <webkit-dev at lists.webkit.org> wrote:
>>>>> 
>>>>> To reduce the overhead of switching between projects with different
>>>>> whitespace requirements, I would like to suggest we start being
>>>>> lenient when trailing whitespace is removed. In particular when a file
>>>>> is being changed to fix a bug.
>>>>> 
>>>>> I could see going even further and enforcing this via the style
>>>>> checker, if there is appetite for that.
>>>>> 
>>>>> Thanks for considering!
>>>>> _______________________________________________
>>>>> webkit-dev mailing list
>>>>> webkit-dev at lists.webkit.org
>>>>> https://lists.webkit.org/mailman/listinfo/webkit-dev
>>>> 
>>>> _______________________________________________
>>>> webkit-dev mailing list
>>>> webkit-dev at lists.webkit.org
>>>> https://lists.webkit.org/mailman/listinfo/webkit-dev
>>> 
>>> _______________________________________________
>>> webkit-dev mailing list
>>> webkit-dev at lists.webkit.org
>>> https://lists.webkit.org/mailman/listinfo/webkit-dev
>> 
> 
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20230412/35b32cc6/attachment.htm>


More information about the webkit-dev mailing list