2022-01-24 07:00:14 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# Note: This is a prototype for how we could add static code analysis to the CI.
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2023-08-12 11:43:13 +00:00
|
|
|
VERSION=$(bin/buildinfo.py long)
|
2022-01-24 07:00:14 +00:00
|
|
|
|
|
|
|
# The shell vars the build tool expects to find
|
|
|
|
export APP_VERSION=$VERSION
|
|
|
|
|
2022-01-24 19:58:07 +00:00
|
|
|
if [[ $# -gt 0 ]]; then
|
2023-08-12 11:43:13 +00:00
|
|
|
# can override which environment by passing arg
|
|
|
|
BOARDS="$@"
|
2022-01-24 19:58:07 +00:00
|
|
|
else
|
2024-02-21 16:03:45 +00:00
|
|
|
BOARDS="tlora-v2 tlora-v1 tlora_v1_3 tlora-v2-1-1.6 tbeam heltec-v2.0 heltec-v2.1 tbeam0.7 meshtastic-diy-v1 rak4631 rak4631_eink rak11200 t-echo canaryone pca10059_diy_eink"
|
2022-01-24 19:58:07 +00:00
|
|
|
fi
|
2022-01-24 07:00:14 +00:00
|
|
|
|
2022-02-11 02:21:36 +00:00
|
|
|
echo "BOARDS:${BOARDS}"
|
2022-01-27 08:18:31 +00:00
|
|
|
|
|
|
|
CHECK=""
|
|
|
|
for BOARD in $BOARDS; do
|
2023-08-12 11:43:13 +00:00
|
|
|
CHECK="${CHECK} -e ${BOARD}"
|
2022-01-27 08:18:31 +00:00
|
|
|
done
|
|
|
|
|
2023-08-12 11:43:13 +00:00
|
|
|
pio check --flags "-DAPP_VERSION=${APP_VERSION} --suppressions-list=suppressions.txt" $CHECK --skip-packages --pattern="src/" --fail-on-defect=medium --fail-on-defect=high
|