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

Re: [PATCH] CODING_STYLE: Add a section of the naming convention


  • To: Julien Grall <julien@xxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Mon, 4 Dec 2023 11:20:25 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; 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=AKAh+CP7L8sUUdKiWQXAI/d+t9xt+4qqGVTXhh0l9Gs=; b=iY/Sh58puz+Eb9H3W1NGvGoGfgDuEBCGlEWmYEnMLGJmzgzvtPeDi43qdw+ObkK/U5gOcbldutkjdaVmkMTpNdHkRRE4Hn+Kyv9sP8NvDPMXDLpQC7XzR6/S29G6MEnY/Ayorb2IaALaqVYT3tcL4uDrC1KnAiisvp/Y2E/d4HHj3B8f+l1uSFpJL/g+8TuC1r0Ji/p+JzBPl1ByqDfnw/GBn8gVQiNfUd2FI6m/L1Abi7ySSqpD4seQMqfyeRVrjeLn5KkUqa1rFLC0GyctpLsmPaRcLfJ2mud3vr7eEXkZc5K9GSUjC5AFOyjWxNOFI0mHbTIZRrw5+cZsZOdvTw==
  • 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=AKAh+CP7L8sUUdKiWQXAI/d+t9xt+4qqGVTXhh0l9Gs=; b=Qtu/93Fwv4U6UwD4yFID7b+aUz/7LTMf6YN1iH7J56kQgCaLXxvfdy1cIW0xJw0Igxht1USMeY0UcPmxjhAjktPGNZgtlXqfIzyv0oLokLMJEDGHxrek947FOCHvv4d2zGJ73HwCXIo12nhDhavCQSOWEab9yjLL+nAbBWbW9BwANAKLHq/K/yLn7I2Sex1pBqjDPsSS2cF93axD2ou7nNZvfsC0XvCm1I1nh0tGM8B4k5Q9y6hHejfEHJ6yuVhLdlYPXavyBeyq2BNqezEmsVnxfyo72lflhOychq7mNUGKLTzKrH2X2qPwefZAfXv77f6hUryjgg0RnFbDL90XXw==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=TH8uC9U1it20MKjoKHHvYi9QAHSoG9ElgJ3X3QlS7mm1bgOMeq4XGL8XwiUHV+8+RoefvqlXTAkMRVXs2L1xog3R/GUvJgFh/Qy3WQOX7w0lBRMcWLjkssh/2RCatE6rFTswnlOhpkZi9J7Hnd3A3Uf5zYui5fGom2vuzgz8XsAzeuX9iYqqT6JKRNymF4meAhsIrYc7nGCEwDbgdGzWTyneuYL7V6jm/qbgxtRUalJeocEhDvX+jQMp6DypKZSFrsOa6PJT3Eoxdua51EMYpJNk/44mpa+1/8gRJ0pWMYEGcnojXX1tNXcX+iXmMddGFvxndvQ/7923LenGPNcVeA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=db7YEtXb7y7MClJtxHG9rhwGWkXxlyvwaizwioe1L0D0VnBV73fcALicH7H8bE/BzdU9fkUmrT3GE8giSMq5+U4F1E61IYUIYgb2Ap3iKHg1oB1+INnpD7kzhXvF15T0ajDoTIv1D/hLpQeHQKGuLIpxJBrmknYXAVmqt8ahC7jVjRH5q4SUQwfd4gdJlJJx24JurRKwBSFE8Aq2j5mW0uSdGZ4cQaU+cjUh9p1E++k5bqEU/DHt4VIgM5IQ5yoYXb1wz81DgyhCv0HP61GLcRulrhOfasQdlIeRWxafuMFhOzKCke3phvNdJ6iKF6GR4NC5OQPPIxzIJjHI1/814w==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Mon, 04 Dec 2023 11:20:46 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHaJIbmwHP4nuD1ZUiv2fi04v+voLCUxT2AgAQ5aoA=
  • Thread-topic: [PATCH] CODING_STYLE: Add a section of the naming convention


> On 1 Dec 2023, at 18:49, Julien Grall <julien@xxxxxxx> wrote:
> 
> 
> 
> On 01/12/2023 18:47, Julien Grall wrote:
>> From: Julien Grall <jgrall@xxxxxxxxxx>
>> Several maintainers have expressed a stronger preference
>> to use '-' when in filename and option that contains multiple
>> words.
>> So document it in CODING_STYLE.
>> Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>
>> ---
>>  CODING_STYLE | 9 +++++++++
>>  1 file changed, 9 insertions(+)
>> diff --git a/CODING_STYLE b/CODING_STYLE
>> index ced3ade5a6fb..afd09177745b 100644
>> --- a/CODING_STYLE
>> +++ b/CODING_STYLE
>> @@ -144,6 +144,15 @@ separate lines and each line should begin with a 
>> leading '*'.
>>   * Note beginning and end markers on separate lines and leading '*'.
>>   */
>>  +Naming convention
>> +-----------------
>> +
>> +When command line option or filename contain multiple words, a '-'
>> +should be to separate them. E.g. 'timer-works'.
>> +
>> +Note that some of the option and filename are using '_'. This is now
>> +deprecated.
> 
> Urgh, I sent the wrong draft :(. This is the wording I wanted to propose:
> 
> +Naming convention
> +-----------------
> +
> +'-' should be used to separate words in commandline options and filenames.
> +E.g. timer-works.
> +
> +Note that some of the options and filenames are using '_'. This is now
> +deprecated.
> +
> 

Hi Julien,

Can we make an exception for python files that are meant to be used as module?
Because modules containing ‘-‘ cannot be imported using ‘import’ keyword and
needs another way to do them which is not conventional

Cheers,
Luca


> Cheers,
> 
> -- 
> Julien Grall
> 


 


Rackspace

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