Ben Pfaff <[email protected]> writes:

> Hi Aaron, checkpatch currently tries to ignores files in the "datapath"
> directories but it's not entirely successful.  I think that's because,
> in the "parse == 1" case, it doesn't strip a leading "a/" or "b/" from
> filenames:
>                 current_file = match.group(2)
> whereas in the "parse == 2", it does:
>                 current_file = newfile.group(2)[2:]
> and the check for "datapath" relies on the / being there:
>             # Skip files which have /datapath in them, since they are
>             # linux or windows coding standards
>             if '/datapath' in current_file:
>                 continue
> I'm not sure where the real bug is.  Should the prefix be consistently
> stripped or not stripped?  Once that's decided, it's easy to fix the
> problem.

I think it should be consistently stripped.  The regex matches don't
care, but when the filename is printed to the screen, it will include b/
which makes simply opening the file in an editor not work correctly.

I think given that, the parse==1 case is incorrect, and the datapath
check is also incorrect.

Make sense?

> Thanks,
>
> Ben.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to