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

Re: [RFC PATCH 5/5] xen: Add clang-format configuration


  • To: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 10 Aug 2023 10:08:57 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VeqaQGm2SvFd1mSvQd1T0j7R+k314rTD9k3Q+ZG/iqY=; b=nPUm5OOPLSUzBdStMBhPKjb2KvxvoKPG+ohwtgXHfc6PxZ53oFyOtB24hBO0L+HVXGrmd7QEO+nqwvuWT/oGd4ZrvaQSb9VjG0++gyRl0Xs8jTxQPFh9dSrinIVUQeUHMOaaHcdUaN+HWYjlmuwDRhXM1FGDj/F0jYT+PEdXWrRBsfTLmJZ2OFvyY57BAn+OcR6KyJv5Siytv+rxha6ortxVDCJZctKzEtItJLxjQSKsAYZONsiWOXpgfaRE9Rh7PuMfxF8nCuoiLSvG1aqcY3RTR5JvD5ECL/8ElBcpBDN8HbKjZNA0Cr4s5ZYYmDHHAfRTiL1y9GUoT9vmeCxkXg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I5xaKSsFUzB1tHUZfRRxFQCk+LN7iskJspXw9Rn44cAXfglic5leSctAc2nHkcvtfEwU29utvv3D3gxga7BovVKNcNxQlDXqt6zVbwRP0DWfZrOXX+NIDx0ywKIoIdRab491bG6uHB/HsF+4ScB+effi4eSZazJAyN0OqdJ/Bbe+VXOicCd8ybGbpUKLJqwRQdTYkGdDbEnXQkM6I6gYQu7DALfOHiae195ODZNap+HuUuJV3xJUrUDVkgTxSni8CidCs2v+qLuu5am2MG/JiVn7UwSX6Fvgjc0i8G7sDHdBsxGFgDT5hYXzF4oUoU6b9YAMisthQ6ZhRLAzXxOoMQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 10 Aug 2023 08:09:06 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 09.08.2023 18:18, Luca Fancellu wrote:
>> On 9 Aug 2023, at 16:48, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>> On 28.07.2023 10:11, Luca Fancellu wrote:
>>> --- /dev/null
>>> +++ b/xen/.clang-format
>>> @@ -0,0 +1,693 @@
>>> +# SPDX-License-Identifier: GPL-2.0-only
>>> +#
>>> +# clang-format configuration file. Intended for clang-format >= 15.
>>> +#
>>> +# For more information, see:
>>> +#
>>> +#   Documentation/process/clang-format.rst
>>> +#   https://clang.llvm.org/docs/ClangFormat.html
>>> +#   https://clang.llvm.org/docs/ClangFormatStyleOptions.html
>>> +#
>>> +---
>>> +
>>> +# [not specified]
>>> +# Align function parameter that goes into a new line, under the open 
>>> bracket
>>> +# (supported in clang-format 3.8)
>>> +AlignAfterOpenBracket: Align
>>
>> I'm not convinced this rule (assuming I'm getting it right) is
>> suitable in all cases, especially for functions with long names or
>> very many parameters.
> 
> Not sure I understand, I think this is the current behaviour in the codebase 
> now.

My understanding is that the above aims at (only)

unsigned long function(unsigned long first_long_argument,
                       unsigned long second_long_argument);

when we also permit

unsigned long function(
    unsigned long first_long_argument,
    unsigned long second_long_argument);

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.