[ovs-dev] [PATCH] checkpatch: Escape range operators inside regex.

Aaron Conole aconole at redhat.com
Mon Feb 18 17:03:42 UTC 2019


Ilya Maximets <i.maximets at samsung.com> writes:

> ' -(' matches a single character in the range between ' ' (index 32)
> and '(' (index 40). This leads to the false positive:
>
>   WARNING: Line lacks whitespace around operator
>   #445 FILE: ovsdb/monitor.c:573:
>       if (--mcs->n_refs == 0) {
>
> Need to escape '-' to have a right behaviour.
> This patch additionally escapes all other '-' chars in the similar
> regexes and makes them be one per line to ease the review in case of
> future changes.
>
> Basic unit tests added.
>
> CC: Joe Stringer <joe at ovn.org>
> Fixes: 0d7b16daea50 ("checkpatch: Check for infix operator whitespace.")
> Signed-off-by: Ilya Maximets <i.maximets at samsung.com>
> ---

Acked-by: Aaron Conole <aconole at redhat.com>

Thanks for fixing this, Ilya!


More information about the dev mailing list