On Thu, Mar 24, 2016 at 2:23 PM, Aaron Conole <acon...@redhat.com> wrote:

> Most projects have a checkpatch facility, which can be used as a pre-commit
> sanity check. This introduces such a mechanism to the Open vSwitch project
> to catch some of the more silly formatting mistakes which can occur. It is
> not meant to replace good code review practices, but it can help eliminate
> the silly code review issues which get added.
>
> Suggested-by: Mauricio Vásquez <mauricio.vasquezber...@studenti.polito.it>
> Signed-off-by: Aaron Conole <acon...@redhat.com>
> ---
>  CONTRIBUTING.md      |   4 ++
>  python/checkpatch.py | 137
> +++++++++++++++++++++++++++++++++++++++++++++++++++
>

This is kind of nit picky, but how about the utilities directory?

I think the python directory should be limited to what we consider the ovs
Python library.  That's largely what it is, except for the build/ and
ovstest/ directories.


>  2 files changed, 141 insertions(+)
>  create mode 100644 python/checkpatch.py
>

Can you make this get checked by flake8 and then fix the resulting
warnings?  Here's an incremental that will do it (before moving the file,
anyway):

diff --git a/python/automake.mk b/python/automake.mk
index dc62422..b4d827a 100644
--- a/python/automake.mk
+++ b/python/automake.mk
@@ -55,7 +55,8 @@ FLAKE8_PYFILES += \
        python/setup.py \
        python/build/__init__.py \
        python/build/nroff.py \
-       python/ovs/dirs.py.template
+       python/ovs/dirs.py.template \
+       python/checkpatch.py

 if HAVE_PYTHON
 nobase_pkgdata_DATA = $(ovs_pyfiles) $(ovstest_pyfiles)
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to