Describe the trailing command accurately in the gate's finding message

For a value-returning helper the trailing echo is the return mechanism, not a
log call. The hazard is the same either way -- it fixes the exit status at zero
-- but calling it a log call misdescribes four of the sites the gate now finds.
This commit is contained in:
Johnathan Corgan
2026-07-23 15:46:04 +00:00
parent d4a2504f99
commit 6319c7f577
+2 -2
View File
@@ -195,8 +195,8 @@ def main() -> int:
print(f" last statement: {stmt[:100]}") print(f" last statement: {stmt[:100]}")
print(f" status consumed by: {', '.join(callers)}") print(f" status consumed by: {', '.join(callers)}")
print(f" fix: add an explicit `return 0` as the last statement. Its " print(f" fix: add an explicit `return 0` as the last statement. Its "
f"success value is currently whatever the log call returned, " f"success value is currently the trailing command's, which is 0 "
f"which is 0 whatever the function did.") f"whatever the function did.")
print(f"trailing-log check: {scanned} function(s) scanned, " print(f"trailing-log check: {scanned} function(s) scanned, "
f"{shaped} end in a logging call, {len(ALLOWED)} allowed, " f"{shaped} end in a logging call, {len(ALLOWED)} allowed, "