On 11/19/21 15:15, Aaron Conole wrote: > Mike Pattrick <[email protected]> writes: > >> As part of some previous checkpatch work, we discovered that checkpatch >> isn't always reporting correct line numbers. As it turns out, Python's >> splitlines function considers several characters to be new lines which >> common text editors do not typically consider to be new lines. For >> example, form feed characters, which this code base uses to cluster >> functionality. >> >> To retain a very similar functionality to what exists now, we will >> split on "\r?\n" and strip off the other characters that previously >> splitlines was splitting on.
Looks way too complex to me. Can we just skip and not count lines with a single ^L on them instead? They are supposed to be on their own lines. And there should be no other control characters in the code. Best regards, Ilya Maximets. >> >> Signed-off-by: Mike Pattrick <[email protected]> >> --- > > Thanks for the fix. I noticed it when I ran > > $ ./utilities/checkpatch.py -f ofproto/ofproto.c > > and the line numbers started to drift. With this change, I don't see > that behavior any longer. > > Acked-by: Aaron Conole <[email protected]> > > _______________________________________________ > dev mailing list > [email protected] > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
