qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tests: add a "check-flake8" test for validating python code


From: Daniel P . Berrangé
Subject: Re: [PATCH] tests: add a "check-flake8" test for validating python code style
Date: Thu, 30 Apr 2020 09:55:15 +0100
User-agent: Mutt/1.13.3 (2020-01-12)

On Thu, Apr 30, 2020 at 07:23:59AM +0200, Markus Armbruster wrote:
> Daniel P. Berrangé <address@hidden> writes:
> > +check-flake8:
> > +   $(call quiet-command,flake8 --ignore=$(FLAKE8_IGNORE) $(PYTHON_FILES))
> > +else
> > +check-flake8:
> > +endif
> > +
> > +check: check-block check-qapi-schema check-unit check-softfloat 
> > check-qtest check-decodetree check-flake8
> >  check-clean:
> >     rm -rf $(check-unit-y) tests/*.o tests/*/*.o $(QEMU_IOTESTS_HELPERS-y)
> >     rm -rf $(sort $(foreach target,$(SYSEMU_TARGET_LIST), 
> > $(check-qtest-$(target)-y:%=tests/qtest/%$(EXESUF))) 
> > $(check-qtest-generic-y:%=tests/qtest/%$(EXESUF)))
> 
> The QAPI generator is already clean except for
> F403,F405,E241,W503,W504,E226,E501,E261.  The new automated cleanliness
> test is next to useless for keeping it that way.  How could we tailor it
> to solve that?

We would have to run flake8 multiple times, passing different exclusions
for different sets of files.  This wouldn't be too bad as long as we don't
get too many different sets of files. We could split it into iotests,
qapi and misc for example.


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




reply via email to

[Prev in Thread] Current Thread [Next in Thread]