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

Ben Pfaff blp at ovn.org
Fri Feb 22 20:51:02 UTC 2019


On Mon, Feb 18, 2019 at 12:03:42PM -0500, Aaron Conole wrote:
> 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!

Thanks, applied to master.


More information about the dev mailing list