gofmt gate: NOT CHECKED (out loud) on the Go-less CI runner, INCONCLUSIVE elsewhere; decoys for both (CI run 1371 was red)
gates / gates (push) Successful in 49s
gates / gates (push) Successful in 49s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
@@ -37,9 +37,21 @@ def find_gofmt():
|
||||
return None
|
||||
|
||||
|
||||
def in_ci():
|
||||
"""True on the Gitea Actions runner (act sets GITHUB_ACTIONS, Gitea sets GITEA_ACTIONS)."""
|
||||
return os.environ.get("GITEA_ACTIONS") == "true" or os.environ.get("GITHUB_ACTIONS") == "true"
|
||||
|
||||
|
||||
def main():
|
||||
gofmt = find_gofmt()
|
||||
if not gofmt:
|
||||
# The CI runner is Alpine + python3 + git — no Go toolchain (felhom.eu CLAUDE.md, R-887 note). There the gate
|
||||
# says so OUT LOUD and passes: the pre-push hook on the developer's machine, where Go always exists, is where
|
||||
# formatting is enforced. Anywhere else a missing gofmt stays INCONCLUSIVE — never a silent pass.
|
||||
# Pinned by the "gofmt/ci-without-go" and "gofmt/dev-without-go" decoys in test_gate_decoys.py.
|
||||
if in_ci():
|
||||
print("gofmt gate NOT CHECKED in CI: no Go toolchain on the runner — the pre-push hook (with Go) enforces it")
|
||||
return 0
|
||||
print("gofmt gate INCONCLUSIVE: gofmt not found on PATH or under `go env GOROOT`/bin")
|
||||
return 2
|
||||
roots = [r for r in ROOTS if os.path.isdir(os.path.join(CTRL, r))]
|
||||
|
||||
Reference in New Issue
Block a user