-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathcheck-code.sh
executable file
·34 lines (26 loc) · 1.07 KB
/
check-code.sh
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
#!/usr/bin/env bash
# Convenience script for running Travis-like checks.
set -eu
set -x
shopt -s globstar
pylint -j 2 --reports no \
digitalearthau \
scripts/**/*.py
# We check the integration tests even though they aren't run by default here.
pylint --rcfile=integration_tests/pylintrc integration_tests/**/*.py
# E122: 'continuation line' has too many spurious errors.
# E711: "is None" instead of "= None". Duplicates pylint check.
# E701: "multiple statements on one line" is buggy as it doesn't understand py 3 types
# E501: "line too long" duplicates pylint check
pycodestyle --ignore=E122,E711,E701,E501 --max-line-length 120 \
digitalearthau \
integration_tests \
scripts/**/*.py
shellcheck ./**/*.sh
yamllint ./**/*.yaml
# Users can specify extra folders (ie. integration_tests) as arguments.
#
# The code in here has been deprecated, and is using outdated ODC imports.
# Tests will not work on recent ODC.
# pytest -r sx --cov digitalearthau --durations=5 digitalearthau scripts/**/*.py "$@"
eo3-validate --warnings-as-errors digitalearthau/config/eo3