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

Ján Tomko jtomko at redhat.com
Thu Jul 26 14:00:28 UTC 2018


On Thu, Jul 26, 2018 at 03:20:49PM +0200, Katerina Koukiou wrote:
>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.

s/currently is/is currently/

or just drop the line completely, that way it won't need updating.

>+    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
>+

I'd add the list of ignored warnings here:

# E501: (line too long) warning is ignored.

>+.PHONY: flake8
>+flake8:
>+	flake8 --ignore=E501

Maybe add --show-source as well.

>+
>+syntax-check: flake8

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180726/fe37dac1/attachment-0001.sig>


More information about the libvir-list mailing list