MCPcopy
hub / github.com/yeasy/docker_practice / check_links

Function check_links

check_project_rules.py:162–172  ·  view source on GitHub ↗
(path: Path, text: str)

Source from the content-addressed store, hash-verified

160
161
162def check_links(path: Path, text: str) -> list[str]:
163 issues: list[str] = []
164 body = strip_fenced_blocks(text)
165 for start, raw_target in iter_markdown_link_targets(body):
166 line_no = body[:start].count("\n") + 1
167 issues.extend(check_target(path, raw_target, line_no))
168 for match in HTML_TARGET_RE.finditer(body):
169 raw_target = next(group for group in match.groups() if group is not None).strip()
170 line_no = body[: match.start()].count("\n") + 1
171 issues.extend(check_target(path, raw_target, line_no))
172 return issues
173
174
175def check_summary_links() -> list[str]:

Callers 2

check_summary_linksFunction · 0.85
mainFunction · 0.85

Calls 3

strip_fenced_blocksFunction · 0.85
check_targetFunction · 0.85

Tested by

no test coverage detected