Skip to content

Commit 1926af8

Browse files
cclausspeterbarker
cclauss
authored andcommitted
Add flake8 --exit-zero to the Travis CI process
1 parent 2191360 commit 1926af8

File tree

2 files changed

+48
-1
lines changed

2 files changed

+48
-1
lines changed

.flake8

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
[flake8]
2+
count = True
3+
# 127 characters is the width of a GitHub editor
4+
max-line-length = 127
5+
statistics = True
6+
# E401 multiple imports on one line
7+
# E402 module level import not at top of file
8+
# E502 the backslash is redundant between brackets
9+
# E701 multiple statements on one line (colon)
10+
# E703 statement ends with a semicolon
11+
# E711 comparison to None should be 'if cond is not None:'
12+
# E712 comparison to False should be 'if cond is False:' or 'if not cond:'
13+
# E713 test for membership should be 'not in'
14+
# E731 do not assign a lambda expression, use a def
15+
# E999 SyntaxError: invalid syntax
16+
# F401 'time' imported but unused
17+
# F403 'from math import *' used; unable to detect undefined names
18+
# F405 log may be undefined, or defined from star imports: math
19+
# F811 redefinition of unused 'radians' from line 26
20+
# F821 undefined name 'filename'
21+
# F841 local variable 'e' is assigned to but never used
22+
# W191 indentation contains tabs
23+
select =
24+
E401,
25+
E402,
26+
E502,
27+
E701,
28+
E703,
29+
E711,
30+
E712,
31+
E713,
32+
E731,
33+
E999,
34+
F401,
35+
F403,
36+
F405,
37+
F811,
38+
F821,
39+
F841,
40+
W191,

.travis.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ python:
55
- "3.3"
66
- "3.5"
77

8+
install:
9+
- pip install -r requirements.txt
10+
- pip install flake8
11+
12+
before_script:
13+
# --exit-zero means that flake8 will only warn and not stop the build
14+
flake8 . --exit-zero
15+
816
script:
917
# NOTE: we must do all testing on the installed python package, not
1018
# on the build tree. Otherwise the testing is invalid and may not
@@ -13,7 +21,6 @@ script:
1321
# Set pythonpath
1422

1523
# install
16-
- pip install -r requirements.txt
1724
- git clone git://github.com/mavlink/mavlink.git
1825
- ln -s $PWD/mavlink/message_definitions ../
1926
- python setup.py build install

0 commit comments

Comments
 (0)