Something went wrong. Try again.
Integrated repository, worktree, git stacker, and project manager
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132"""`pm check` — top-level invariant checker."""
import sysfrom typing import Annotated
from cyclopts import Parameter
from project_manager import check as check_modfrom project_manager import config, render
from ._shared import root
@root.commanddef check( *, fix: bool = False, json: Annotated[bool, Parameter(negative="")] = False,) -> int: """Verify invariants across pool and projects.
Exits 1 when any non-healthy finding remains (and --fix was not passed). """ paths = config.load() findings = check_mod.check(paths) render.emit_rows(findings, check_mod.COLUMNS, as_json=json) if fix: applied = check_mod.fix(paths, findings) print(f"# applied {applied} fix(es)", file=sys.stderr) non_healthy = [f for f in findings if f.kind != check_mod.Kind.ACTIVE] return 1 if non_healthy and not fix else 0