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

Re: [RFC PATCH v2 7/8] xen: Add clang-format configuration


  • To: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 2 Nov 2023 12:53:00 +0100
  • 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=o1KA8qJIqLWTqZ00YDqq6kXEDEkylLPDVPyw/Qtdjws=; b=cETl6tWlXo9Kab9eWzw3JpZYqIclkTrmO6HTtBMU5/paXqlcHx6kWW0EgTYdvM1sMoHx4ZMflpnyr6RSbchKZBR1dAYfoY0SdFDmPi8kIgs4yfbopVFdAH4IC4PEb4517zTkExevva3pUp80Eb2VfQBPUXP47dny37hISTVXCMkge7maMGbq68D0DeE5EeYLGjIMwRcIw4yEDdJb/aohe1iT597UcjgjO2bmqBRysYNzzcy/hcM956kNh9z03lIgNAphDCxqyPFBwHzLIasFCvrho4fnnK97h/RuRvE62QRSyJXhy+rJxlbVpfegZXP+xoglqPLUpgkGEF2XCtDN6Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MP/188sceik53rsaWALkZY2Do82oI8pLkgB8LtE9OmcPlOwPf29cthBaP6/r2W85oY8Jm6IQUHNs/XKXLAuvJeFn4Diz57W/DbOm9o19wEhtNjxqio0pWZpXTKTyrFy20WLoCVJTNvTsHP5oeJ/Wccv/7YSRDAGvI6E6+pcAM+6LZ1E4FdXwHZ9uHs7uauKxg616TNoAfxVhnXgVWCJIbIwxFoAWDtCCxP1iNQuBEmnXJ5eLyT80JlHC18OaagSfIizzJRRlyr5sFNWcZZn2v6VWJczUlVhsEmSSu/0c2dewO+V6qomOGgb/LdR4YL3zS9Dy6ls8lMQm5Q5NR83Z0w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: 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, 02 Nov 2023 11:53:15 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 02.11.2023 12:41, Luca Fancellu wrote:
>> On 2 Nov 2023, at 09:10, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>> On 31.10.2023 14:23, Luca Fancellu wrote:
>>> Add a clang format configuration for the Xen Hypervisor.
>>>
>>> Signed-off-by: Luca Fancellu <luca.fancellu@xxxxxxx>
>>> ---
>>> xen/.clang-format | 693 ++++++++++++++++++++++++++++++++++++++++++++++
>>> 1 file changed, 693 insertions(+)
>>> create mode 100644 xen/.clang-format
>>
>> I think this needs splitting and every setting then individually correlating
>> with what we have in ./CODING_STYLE. That would entail extending 
>> ./CODING_STYLE
>> by anything not presently written down, but intended to be checked for.
> 
> Do you mean introducing one parameter for each patch with the corresponding 
> entry in
> CODING_STYLE?
> 
> It would make sense, however there are 116 parameters, from those I think at 
> least 56 needs
> to have a corresponding entry in CODING_STYLE (maybe in the end they will be 
> less, but I don’t expect
> them to be less than 40), so given the amount of patches, I’m afraid to flood 
> the mailing list.

Some grouping may certainly make sense, for related settings. What I'm
completely lost with the present submission is which of the settings
merely enforce existing content of ./CODING_STYLE, and which ones
(silently) impose new rules which everyone may agree with, but also may
not.

> I was thinking we could discuss them in chunks and update the serie during 
> time, we could put in this
> patch also the update to the CODING_STYLE file. Something like the MISRA rule 
> acceptance, what
> do you think? Shall we do the discussion by ML or by meetings? Every time I 
> could bring up a number
> of parameters and update the serie when the discussion on them is finished.

Afaic - email if at all possible. The more that, considering past
attempts to extend ./CODING_STYLE, for some items it may be close to
impossible to reach agreement.

> This is my breakdown:
> 
> 116 total configurables
> 
> ================================================================================
> 13 straightforward

What exactly do you qualify as such?

> AttributeMacros:
>   -[...]
> 
> ColumnLimit: 80
> 
> IndentWidth: 4
> 
> Language: Cpp
> 
> MacroBlockBegin: '^PLATFORM_START|^DT_DEVICE_START|^ACPI_DEVICE_START'
> 
> MacroBlockEnd: '^PLATFORM_END|^DT_DEVICE_END|^ACPI_DEVICE_END'

Without explanation it is, for example, not clear to me what these two
settings are about. Which includes me not understanding why these
identifiers are (apparently) special in some specific way.

> Standard: C++03

I don't consider this "straightforward" at all. Only C99 could be deemed
straightforward here, imo.

> ================================================================================
> 10 don't really need a discussion
> 
> PenaltyBreakAssignment: 30
> 
> PenaltyBreakBeforeFirstCallParameter: 30
> 
> PenaltyBreakComment: 10
> 
> PenaltyBreakFirstLessLess: 0
> 
> PenaltyBreakOpenParenthesis: 100
> 
> PenaltyBreakString: 10
> 
> PenaltyExcessCharacter: 100
> 
> PenaltyIndentedWhitespace: 0
> 
> PenaltyReturnTypeOnItsOwnLine: 60
> 
> CommentPragmas: '^ IWYU pragma:'

Like with the "straightforward" ones above, without knowing what these
affect (or whether some simply don't affect us at all, and hence could
be set to any value) I can't follow the "don't really need a discussion"
qualification.

Jan



 


Rackspace

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