[CRIU] [PATCH 2/4] add a Makefile with a lint target
Pavel Emelyanov
xemul at parallels.com
Fri Oct 23 08:22:02 PDT 2015
On 10/22/2015 09:08 PM, Nikita Spiridonov wrote:
> Acked-by: Nikita Spiridonov <nspiridonov at odin.com>
>
> Tycho, thanks for the patch, I think we really need linting in p.haul.
> We can reform code and get rid of some ignores as time goes by, for
> example E302. I also dream of disallowing mixed tabs/spaces (E101), but
> Pavel don't like that idea.
I don't don't like the idea :) I'm OK if we don't mix tabs and spaces, but
I see nothing bad in doing this _where_ _it_ _makes_ _sense_.
> On Thu, 2015-10-22 at 11:50 -0600, Tycho Andersen wrote:
>> I find linting in python extremely useful since we don't really have a
>> compiler; here's a shortcut for linting.
>>
>> Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
>> ---
>> Makefile | 3 +++
>> test/flake8.cfg | 10 ++++++++++
>> 2 files changed, 13 insertions(+)
>> create mode 100644 Makefile
>> create mode 100644 test/flake8.cfg
>>
>> diff --git a/Makefile b/Makefile
>> new file mode 100644
>> index 0000000..e440df7
>> --- /dev/null
>> +++ b/Makefile
>> @@ -0,0 +1,3 @@
>> +.PHONY: lint
>> +lint:
>> + flake8 --config=./test/flake8.cfg p.haul p.haul-wrap phaul/*.py
>> diff --git a/test/flake8.cfg b/test/flake8.cfg
>> new file mode 100644
>> index 0000000..fff964a
>> --- /dev/null
>> +++ b/test/flake8.cfg
>> @@ -0,0 +1,10 @@
>> +[flake8]
>> +# W191 indentation contains tabs
>> +# E128 continuation line under-indented for visual indent
>> +# E225 missing whitespace around operator
>> +# E302 expected 2 blank lines, found 1
>> +# E501 line too long
>> +# E251 unexpected spaces around keyword / parameter equals
>> +# E301 expected 1 blank line, found 0
>> +# E101 indentation contains mixed spaces and tabs
>> +ignore = W191,E128,E225,E302,E501,E251,E301,E101
>
>
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
> .
>
More information about the CRIU
mailing list