mirror of
https://github.com/openvswitch/ovs
synced 2025-08-30 22:05:19 +00:00
checkpatch: Check style of FOREACH loops.
Current checkpatch rules matches only OVS 'FOR_EACH' loops. This change will apply same style checks for DPDK iterators like 'RTE_ETH_FOREACH_MATCHING_DEV () {}'. Acked-by: Aaron Conole <aconole@redhat.com> Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
@@ -142,7 +142,7 @@ def reset_counters():
|
||||
# something in parentheses (usually an expression) then a left curly brace.
|
||||
#
|
||||
# 'do' almost qualifies but it's also used as "do { ... } while (...);".
|
||||
__parenthesized_constructs = 'if|for|while|switch|[_A-Z]+FOR_EACH[_A-Z]*'
|
||||
__parenthesized_constructs = 'if|for|while|switch|[_A-Z]+FOR_*EACH[_A-Z]*'
|
||||
|
||||
__regex_added_line = re.compile(r'^\+{1,2}[^\+][\w\W]*')
|
||||
__regex_subtracted_line = re.compile(r'^\-{1,2}[^\-][\w\W]*')
|
||||
|
Reference in New Issue
Block a user