MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / _should_check_sdk

Function _should_check_sdk

scripts/code-verify.py:2571–2579  ·  view source on GitHub ↗

True when this run covers the SDK: a whole-tree default run, or any path under app/ or scripts/ where the generator and its inputs live.

(paths: list[Path], repo_root: Path)

Source from the content-addressed store, hash-verified

2569
2570
2571def _should_check_sdk(paths: list[Path], repo_root: Path) -> bool:
2572 """True when this run covers the SDK: a whole-tree default run, or any path
2573 under app/ or scripts/ where the generator and its inputs live."""
2574 sdk_roots = (repo_root / "app", repo_root / "scripts")
2575 for p in paths:
2576 rp = p.resolve()
2577 if any(rp == r or r in rp.parents or rp in r.parents for r in sdk_roots):
2578 return True
2579 return False
2580
2581
2582def _sdk_consistency_violations(repo_root: Path) -> list[Violation]:

Callers 1

mainFunction · 0.85

Calls 1

resolveMethod · 0.45

Tested by

no test coverage detected