-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest
More file actions
executable file
·40 lines (33 loc) · 783 Bytes
/
test
File metadata and controls
executable file
·40 lines (33 loc) · 783 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
set -eux
set -o pipefail
pep8_options=(
--show-source
)
pylint_options=(
--disable=invalid-name # TODO don't ignore
--disable=line-too-long # TODO don't ignore
--disable=missing-docstring
--disable=star-args
--include-naming-hint=yes
--output-format=colorized
--reports=no
)
find . -name '*.py' | xargs pep8 ${pep8_options[*]}
py2files=()
py3files=()
for pyfile in *.py; do
if head -n 1 "$pyfile" | grep python3; then
py3files[${#py3files[@]}]="$pyfile"
else
py2files[${#py2files[@]}]="$pyfile"
fi
done
if [[ ${#py2files[@]} != 0 ]]; then
pylint "${pylint_options[@]}" "${py2files[@]}"
fi
if [[ ${#py3files[@]} != 0 ]]; then
pylint3 "${pylint_options[@]}" "${py3files[@]}"
fi
py.test-3
echo OK