[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: |
Markus Armbruster |
Subject: |
Re: [PATCH] tests: add a "check-flake8" test for validating python code style |
Date: |
Thu, 30 Apr 2020 15:40:50 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Daniel P. Berrangé <address@hidden> writes:
> 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.
Sounds good to me!