woodpecker: add static analysis
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
Torrie Fischer 2023-02-18 18:00:19 +01:00
parent cbe3ba3f30
commit ce78825f66
2 changed files with 6 additions and 2 deletions

View File

@ -6,6 +6,7 @@ pipeline:
- pip install -U platformio - pip install -U platformio
- pio run -e bike -e bike_ble - pio run -e bike -e bike_ble
- pio run -e bike -e bike_ble --target buildfs - pio run -e bike -e bike_ble --target buildfs
- pio check -e bike -e bike_ble
build_esp32: build_esp32:
group: build group: build
image: python image: python
@ -13,6 +14,7 @@ pipeline:
- pip install -U platformio - pip install -U platformio
- pio run -e esp32 -e esp32_wifi -e esp32_bluetooth - pio run -e esp32 -e esp32_wifi -e esp32_bluetooth
- pio run -e esp32 -e esp32_wifi -e esp32_bluetooth --target buildfs - pio run -e esp32 -e esp32_wifi -e esp32_bluetooth --target buildfs
- pio check -e esp32 -e esp32_wifi -e esp32_bluetooth
build_8266: build_8266:
group: build group: build
image: python image: python
@ -20,3 +22,4 @@ pipeline:
- pip install -U platformio - pip install -U platformio
- pio run -e esp8266 -e esp8266_wifi - pio run -e esp8266 -e esp8266_wifi
- pio run -e esp8266 -e esp8266_wifi --target buildfs - pio run -e esp8266 -e esp8266_wifi --target buildfs
- pio check -e esp8266 -e esp8266_wifi

View File

@ -2,12 +2,13 @@ Import("env")
import fnmatch import fnmatch
import os import os
import json
def verify_json(source, target, env): def verify_json(source, target, env):
for root, dirnames, files in os.walk("data"): for root, dirnames, files in os.walk("data"):
for file in files: for file in files:
if file.endswith(".json"): if file.endswith(".json"):
if (env.Execute("json_verify < " + root + '/' + file)): print("Validating " + root + '/' + file + '...')
Exit(1) json.load(open(root + '/' + file, 'r'))
env.AddPreAction("buildfs", verify_json) env.AddPreAction("buildfs", verify_json)