From 85f1ecabd7f58f306b2a042376209ac8cf49ab9b Mon Sep 17 00:00:00 2001 From: cirakg Date: Sun, 18 Oct 2026 21:10:37 +0200 Subject: build: complete the Docker pipeline for build, test, screenshots and packaging - Container scripts now run from the mounted project (no image rebuild per script change): build-app.sh (strict -l 3, warnings fail), run-unit-tests.sh, screenshots.sh, app-diag.sh (perf/memory), lint.sh, package.sh and sim-vnc.sh (noVNC on 127.0.0.1:6080). - Headless simulator helpers: wait for port 1234, remove the stale single-instance lock (~/Sim-dev) that made later starts hang, show the simulator log on failure. - New targets: screenshots-approve, icons; `make lock` re-adds the requirements header; pytest treats warnings as errors. - Author/Summary headers on every build file. Co-Authored-By: Claude Opus 5.5 --- docker/scripts/lint.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 docker/scripts/lint.sh (limited to 'docker/scripts/lint.sh') diff --git a/docker/scripts/lint.sh b/docker/scripts/lint.sh new file mode 100755 index 0000000..09b8410 --- /dev/null +++ b/docker/scripts/lint.sh @@ -0,0 +1,33 @@ +#!/usr/bin/env bash +# Author: cirakg & claude ai +# Summary: All static checks: project policy, Python lint and types, and strict Monkey C builds without warnings. +# +# Usage: lint.sh DEVICE [DEVICE ...] +# +# 1. tools/lint_project.py: project rules (headers, no logging, no network, ...) +# 2. ruff (lint + formatting) and mypy --strict on the Python tools +# 3. tools/gen_products.py --check: the manifest's products meet the targets +# 4. Debug and release builds with strict type checking (-l 3) on each device; +# build-app.sh fails on any compiler warning. +set -euo pipefail +# shellcheck source=ciq-env.sh +source "$(dirname "${BASH_SOURCE[0]}")/ciq-env.sh" + +(($# > 0)) || die "usage: lint.sh DEVICE [DEVICE ...]" + +log "project policy" +python3 /work/tools/lint_project.py /work + +log "Python tools: ruff and mypy" +ruff check /work/tools +ruff format --check /work/tools +(cd /work && mypy) + +log "product list" +python3 /work/tools/gen_products.py --check + +for device in "$@"; do + build-app.sh debug "${device}" + build-app.sh release "${device}" +done +log "lint passed" -- cgit v1.2.3