lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <812f7729-1e48-bdcf-18be-c94c57f5e5f2@intel.com>
Date:   Tue, 28 Nov 2023 11:25:11 +0100
From:   Przemek Kitszel <przemyslaw.kitszel@...el.com>
To:     Joe Perches <joe@...ches.com>, Andy Whitcroft <apw@...onical.com>,
        <linux-kernel@...r.kernel.org>
CC:     Jacob Keller <jacob.e.keller@...el.com>,
        Dwaipayan Ray <dwaipayanray1@...il.com>,
        Lukas Bulwahn <lukas.bulwahn@...il.com>
Subject: Re: [PATCH] checkpatch: don't complain on _Static_assert and _Generic
 use

On 11/28/23 01:46, Joe Perches wrote:
> On Mon, 2023-11-27 at 16:18 +0100, Przemek Kitszel wrote:
>> Improve CamelCase recognition logic to avoid reporting on _Static_assert()
>> and _Generic() use.
>>
>> Other C keywords, such as _Bool, are intentionally omitted, as those
>> should be rather avoided in new source code.
> []
>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> []
>> @@ -5839,6 +5839,8 @@ sub process {
>>   #CamelCase
>>   			if ($var !~ /^$Constant$/ &&
>>   			    $var =~ /[A-Z][a-z]|[a-z][A-Z]/ &&
>> +#Ignore C keywords
>> +			    $var !~ /_Static_assert|_Generic/ &&
> 
> You'll need
> 
> 			    $var != /^(?:_Static_assert|_Generic)$/ &&
> 
> to avoid words that contain either

you are correct, thanks

also good to use non-capturing group :)

I will resend after usual 24h

> 
> 
>>   #Ignore some autogenerated defines and enum values
>>   			    $var !~ /^(?:[A-Z]+_){1,5}[A-Z]{1,3}[a-z]/ &&
>>   #Ignore Page<foo> variants
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ