[libvirt] [dbus PATCH 1/3] tests: Point flake8 to the files it needs to check

Andrea Bolognani posted 3 patches 6 years ago
[libvirt] [dbus PATCH 1/3] tests: Point flake8 to the files it needs to check
Posted by Andrea Bolognani 6 years ago
Recent versions of the tool will look for Python scripts
on their own, but when performing a VPATH build it's very
likely the resulting list will be empty and nothing will
actually be checked. Point flake8 to the files explicitly
to avoid the issue.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
---
 Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index cf7994e..a0696bf 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -46,6 +46,6 @@ gen-AUTHORS:
 # E501: (line too long) warning is ignored.
 .PHONY: flake8
 flake8:
-	flake8 --show-source --ignore=E501
+	flake8 --show-source --ignore=E501 $(srcdir)/tests/*.py
 
 syntax-check: flake8
-- 
2.17.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [dbus PATCH 1/3] tests: Point flake8 to the files it needs to check
Posted by Ján Tomko 6 years ago
On Tue, Aug 14, 2018 at 05:30:44PM +0200, Andrea Bolognani wrote:
>Recent versions of the tool will look for Python scripts
>on their own, but when performing a VPATH build it's very
>likely the resulting list will be empty and nothing will
>actually be checked. Point flake8 to the files explicitly
>to avoid the issue.
>
>Signed-off-by: Andrea Bolognani <abologna@redhat.com>
>---
> Makefile.am | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/Makefile.am b/Makefile.am
>index cf7994e..a0696bf 100644
>--- a/Makefile.am
>+++ b/Makefile.am
>@@ -46,6 +46,6 @@ gen-AUTHORS:
> # E501: (line too long) warning is ignored.
> .PHONY: flake8
> flake8:
>-	flake8 --show-source --ignore=E501
>+	flake8 --show-source --ignore=E501 $(srcdir)/tests/*.py

It would be nice to catch any possible .py files in different
directories, so $(srcdir) should be enough.

>
> syntax-check: flake8
>-- 
>2.17.1
>
>--
>libvir-list mailing list
>libvir-list@redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list