commit 8df5f3e24ca202bfaba4f65cb26287be3d4e63f7
parent 3c3d484af59383c9dc00550345c35c8a4507859c
Author: Arjoonn Sharma <arjoonn@midpathsoftware.com>
Date: Sat, 28 Feb 2026 12:19:57 +0530
x
Diffstat:
3 files changed, 59 insertions(+), 1 deletion(-)
diff --git a/.jci/run.sh b/.jci/run.sh
@@ -135,7 +135,14 @@ run_step "Build Image" "scripts/build_image.sh" scripts/build_image.sh
echo ""
# ---------------------------------------------------------------------------
-# Step 2: Cross-compile binaries in parallel
+# Step 2: Static analysis / sanity checks
+# ---------------------------------------------------------------------------
+echo "--- Step 3: Go formatting, vet, and build checks ---"
+run_step "Go Lint" "scripts/check_go.sh" scripts/check_go.sh
+echo ""
+
+# ---------------------------------------------------------------------------
+# Step 3: Cross-compile binaries in parallel
#
# Targets:
# Linux amd64 git-jci-linux-amd64
diff --git a/README.md b/README.md
@@ -2,6 +2,18 @@
> Jaypore CI: Minimal, Offline, Local CI system.
+---
+
+1. [Install](#install)
+2. [Config](#config)
+3. [Environment Vars](#environment-vars)
+4. [Example Workflow](#example-workflow)
+5. [How it works](#how-it-works)
+6. [FAQ / Needs / Wants / Todos](#faq-needs-wants-todos)
+7. [Examples](#examples)
+
+---
+
## Install
```bash
@@ -113,3 +125,9 @@ part of the git repository.
- [ ] Ecosystem of reusable actions/tasks with versioned catalogs and templates
- This is already there? Not sure if this is something we even need to solve?
- [ ] Validate infrastructure-as-code changes and deployment pipelines via dry runs
+
+
+## Examples
+
+### ggj
+
diff --git a/scripts/check_go.sh b/scripts/check_go.sh
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+REPO_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
+cd "${REPO_ROOT}"
+
+if ! command -v go >/dev/null 2>&1; then
+ echo "Go toolchain not found in PATH."
+ exit 1
+fi
+
+echo "Running gofmt checks..."
+mapfile -t GO_FILES < <(git ls-files '*.go')
+if [[ ${#GO_FILES[@]} -eq 0 ]]; then
+ echo "No Go files found; skipping Go checks."
+ exit 0
+fi
+
+FMT_OUTPUT="$(gofmt -l "${GO_FILES[@]}")"
+if [[ -n "${FMT_OUTPUT}" ]]; then
+ echo "The following files need 'gofmt':"
+ echo "${FMT_OUTPUT}"
+ exit 1
+fi
+
+echo "Running go vet..."
+go vet ./...
+
+echo "Ensuring packages build (without tests)..."
+go build ./...
+
+echo "Go formatting, vet, and build checks passed."