Message ID | 20210423130850.1130-1-dceara@redhat.com |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev] checkpatch: Re-enforce line length checks. | expand |
On 23/04/2021 14:08, Dumitru Ceara wrote: > This check was removed by accident, re-add it. Also add a test for it. > > Fixes: 0e77b3bcbfe2 ("ovn-northd-ddlog: New implementation of ovn-northd based on ddlog.") > Signed-off-by: Dumitru Ceara <dceara@redhat.com> > --- > tests/checkpatch.at | 12 ++++++++++++ > utilities/checkpatch.py | 2 +- > 2 files changed, 13 insertions(+), 1 deletion(-) > > diff --git a/tests/checkpatch.at b/tests/checkpatch.at > index 8f45beac9..0c724d3d6 100755 > --- a/tests/checkpatch.at > +++ b/tests/checkpatch.at > @@ -329,3 +329,15 @@ try_checkpatch \ > " > > AT_CLEANUP > + > +AT_SETUP([checkpatch - line too long]) > +try_checkpatch \ > + "COMMON_PATCH_HEADER > + +/* This is a very long line.................................................. */ > + " \ > + "WARNING: Line is 80 characters long (recommended limit is 79) > +#8 FILE: A.c:1: > +/* This is a very long line.................................................. */ > +" > + > +AT_CLEANUP > diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py > index af7bcfc29..9e8d17653 100755 > --- a/utilities/checkpatch.py > +++ b/utilities/checkpatch.py > @@ -184,7 +184,7 @@ skip_signoff_check = False > # > # Python isn't checked as flake8 performs these checks during build. > line_length_blacklist = re.compile( > - r'\.(am|at|etc|in|m4|mk|patch|py|dl)|$|debian/rules') > + r'\.(am|at|etc|in|m4|mk|patch|py|dl)$|debian/rules') > > # Don't enforce a requirement that leading whitespace be all spaces on > # files that include these characters in their name, since these kinds > Good catch. I tested and it worked. Acked-by: Mark D. Gray <mark.d.gray@redhat.com>
On Mon, Apr 26, 2021 at 1:18 PM Mark Gray <mark.d.gray@redhat.com> wrote: > > On 23/04/2021 14:08, Dumitru Ceara wrote: > > This check was removed by accident, re-add it. Also add a test for it. > > > > Fixes: 0e77b3bcbfe2 ("ovn-northd-ddlog: New implementation of ovn-northd based on ddlog.") > > Signed-off-by: Dumitru Ceara <dceara@redhat.com> > > --- > > tests/checkpatch.at | 12 ++++++++++++ > > utilities/checkpatch.py | 2 +- > > 2 files changed, 13 insertions(+), 1 deletion(-) > > > > diff --git a/tests/checkpatch.at b/tests/checkpatch.at > > index 8f45beac9..0c724d3d6 100755 > > --- a/tests/checkpatch.at > > +++ b/tests/checkpatch.at > > @@ -329,3 +329,15 @@ try_checkpatch \ > > " > > > > AT_CLEANUP > > + > > +AT_SETUP([checkpatch - line too long]) > > +try_checkpatch \ > > + "COMMON_PATCH_HEADER > > + +/* This is a very long line.................................................. */ > > + " \ > > + "WARNING: Line is 80 characters long (recommended limit is 79) > > +#8 FILE: A.c:1: > > +/* This is a very long line.................................................. */ > > +" > > + > > +AT_CLEANUP > > diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py > > index af7bcfc29..9e8d17653 100755 > > --- a/utilities/checkpatch.py > > +++ b/utilities/checkpatch.py > > @@ -184,7 +184,7 @@ skip_signoff_check = False > > # > > # Python isn't checked as flake8 performs these checks during build. > > line_length_blacklist = re.compile( > > - r'\.(am|at|etc|in|m4|mk|patch|py|dl)|$|debian/rules') > > + r'\.(am|at|etc|in|m4|mk|patch|py|dl)$|debian/rules') > > > > # Don't enforce a requirement that leading whitespace be all spaces on > > # files that include these characters in their name, since these kinds > > > > Good catch. I tested and it worked. > > Acked-by: Mark D. Gray <mark.d.gray@redhat.com> Thanks. I applied this patch to the main branch. Numan > > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev >
diff --git a/tests/checkpatch.at b/tests/checkpatch.at index 8f45beac9..0c724d3d6 100755 --- a/tests/checkpatch.at +++ b/tests/checkpatch.at @@ -329,3 +329,15 @@ try_checkpatch \ " AT_CLEANUP + +AT_SETUP([checkpatch - line too long]) +try_checkpatch \ + "COMMON_PATCH_HEADER + +/* This is a very long line.................................................. */ + " \ + "WARNING: Line is 80 characters long (recommended limit is 79) +#8 FILE: A.c:1: +/* This is a very long line.................................................. */ +" + +AT_CLEANUP diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py index af7bcfc29..9e8d17653 100755 --- a/utilities/checkpatch.py +++ b/utilities/checkpatch.py @@ -184,7 +184,7 @@ skip_signoff_check = False # # Python isn't checked as flake8 performs these checks during build. line_length_blacklist = re.compile( - r'\.(am|at|etc|in|m4|mk|patch|py|dl)|$|debian/rules') + r'\.(am|at|etc|in|m4|mk|patch|py|dl)$|debian/rules') # Don't enforce a requirement that leading whitespace be all spaces on # files that include these characters in their name, since these kinds
This check was removed by accident, re-add it. Also add a test for it. Fixes: 0e77b3bcbfe2 ("ovn-northd-ddlog: New implementation of ovn-northd based on ddlog.") Signed-off-by: Dumitru Ceara <dceara@redhat.com> --- tests/checkpatch.at | 12 ++++++++++++ utilities/checkpatch.py | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-)