checkpatch: exclude POSIX headers from typedef rule
The `NEW_TYPEDEFS` rule consistently generates false positives when implementing POSIX standard APIs. It makes sense to disable this check for the POSIX haders rather than requiring merge superpowers constantly. That way, we can merge as per usual after sufficient approvals rather than waiting for someone with merge superpowers to override / manually merge. Signed-off-by: Yong Cong Sin <ycsin@meta.com>
This commit is contained in:
parent
b021dece98
commit
2037362e16
|
@ -4164,6 +4164,7 @@ sub process {
|
|||
|
||||
# check for new typedefs, only function parameters and sparse annotations
|
||||
# make sense.
|
||||
if ($realfile =~ /\/include\/zephyr\/posix\/*.h/) {
|
||||
if ($line =~ /\btypedef\s/ &&
|
||||
$line !~ /\btypedef\s+$Type\s*\(\s*\*?$Ident\s*\)\s*\(/ &&
|
||||
$line !~ /\btypedef\s+$Type\s+$Ident\s*\(/ &&
|
||||
|
@ -4172,6 +4173,7 @@ sub process {
|
|||
WARN("NEW_TYPEDEFS",
|
||||
"do not add new typedefs\n" . $herecurr);
|
||||
}
|
||||
}
|
||||
|
||||
# * goes on variable not on type
|
||||
# (char*[ const])
|
||||
|
|
Loading…
Reference in a new issue