MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / scan

Function scan

scripts/lint-memory-core.py:117–133  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

115
116
117def scan() -> dict[str, list[tuple[int, str]]]:
118 hits: dict[str, list[tuple[int, str]]] = {}
119 for root in SCAN_ROOTS:
120 base = ROOT / root
121 if not base.exists():
122 continue
123 for path in sorted(base.rglob("*")):
124 if path.suffix not in (".c", ".h") or not path.is_file():
125 continue
126 rel = path.relative_to(ROOT).as_posix()
127 if is_exempt(rel):
128 continue
129 text = strip_comments_and_strings(path.read_text(encoding="utf-8", errors="replace"))
130 for lineno, line in enumerate(text.splitlines(), 1):
131 for m in RAW.finditer(line):
132 hits.setdefault(rel, []).append((lineno, m.group(1)))
133 return hits
134
135
136def read_baseline() -> dict[str, int]:

Callers 1

mainFunction · 0.85

Calls 2

is_exemptFunction · 0.85

Tested by

no test coverage detected