223.2.4
by Scott Moser
* New upstream snapshot. |
1 |
#!/bin/bash
|
2 |
||
245.3.2
by Scott Moser
* New upstream release. |
3 |
ci_files='cloudinit/*.py cloudinit/config/*.py' |
223.2.4
by Scott Moser
* New upstream snapshot. |
4 |
test_files=$(find tests -name "*.py") |
5 |
def_files="$ci_files $test_files" |
|
6 |
||
7 |
if [ $# -eq 0 ]; then |
|
8 |
files=( ) |
|
9 |
for f in $def_files; do |
|
10 |
[ -f "$f" ] || { echo "failed, $f not a file" 1>&2; exit 1; } |
|
11 |
files[${#files[@]}]=${f} |
|
12 |
done
|
|
13 |
else
|
|
14 |
files=( "$@" ); |
|
15 |
fi
|
|
16 |
||
17 |
if [ -f 'hacking.py' ] |
|
18 |
then
|
|
19 |
base=`pwd` |
|
20 |
else
|
|
21 |
base=`pwd`/tools/ |
|
22 |
fi
|
|
23 |
||
245.3.2
by Scott Moser
* New upstream release. |
24 |
IGNORE="E501" # Line too long (these are caught by pylint) |
25 |
||
26 |
# King Arthur: Be quiet! ... Be Quiet! I Order You to Be Quiet.
|
|
27 |
IGNORE="$IGNORE,E121" # Continuation line indentation is not a multiple of four |
|
28 |
IGNORE="$IGNORE,E123" # Closing bracket does not match indentation of opening bracket's line |
|
29 |
IGNORE="$IGNORE,E124" # Closing bracket missing visual indentation |
|
30 |
IGNORE="$IGNORE,E125" # Continuation line does not distinguish itself from next logical line |
|
31 |
IGNORE="$IGNORE,E126" # Continuation line over-indented for hanging indent |
|
32 |
IGNORE="$IGNORE,E127" # Continuation line over-indented for visual indent |
|
33 |
IGNORE="$IGNORE,E128" # Continuation line under-indented for visual indent |
|
34 |
IGNORE="$IGNORE,E502" # The backslash is redundant between brackets |
|
35 |
||
223.2.4
by Scott Moser
* New upstream snapshot. |
36 |
cmd=( |
37 |
${base}/hacking.py |
|
38 |
||
245.3.2
by Scott Moser
* New upstream release. |
39 |
--ignore="$IGNORE" |
223.2.4
by Scott Moser
* New upstream snapshot. |
40 |
|
41 |
"${files[@]}" |
|
42 |
)
|
|
43 |
||
44 |
echo -e "\nRunning 'cloudinit' pep8:" |
|
45 |
echo "${cmd[@]}" |
|
46 |
"${cmd[@]}" |
|
47 |