[libvirt] [dbus PATCH v2 2/2] Add syntax-check target in Makefile.am

Katerina Koukiou kkoukiou at redhat.com
Thu Jul 26 13:20:49 UTC 2018


For now syntax checking is performed only on the python
files using flake8.

E501: (line too long) warning is ignored.

Signed-off-by: Katerina Koukiou <kkoukiou at redhat.com>
---
 HACKING.md  | 9 ++++++++-
 Makefile.am | 6 ++++++
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/HACKING.md b/HACKING.md
index bb22fd6..9327959 100644
--- a/HACKING.md
+++ b/HACKING.md
@@ -29,7 +29,7 @@ Running from git repository
     ```
 
 
-  * Before posting a patch, you should run tests:
+  * Before posting a patch, you should run tests and perform syntax-checking:
 
     ```
     make check
@@ -37,6 +37,13 @@ Running from git repository
 
     The test tool requires python3, python3-pytest and python3-dbus.
 
+    ```
+    make syntax-check
+    ```
+
+    Syntax checking currently is applied only on the python code.
+    To run this flake8 package is required.
+
 
   * To run libvirt-dbus directly from the build dir without installing it
     use the run script:
diff --git a/Makefile.am b/Makefile.am
index 2c9e588..5c95e96 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -42,3 +42,9 @@ gen-AUTHORS:
 	  mv -f $(distdir)/AUTHORS-tmp $(distdir)/AUTHORS && \
 	  rm -f all.list maint.list contrib.list; \
 	fi
+
+.PHONY: flake8
+flake8:
+	flake8 --ignore=E501
+
+syntax-check: flake8
-- 
2.17.1




More information about the libvir-list mailing list