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

Function main

check_project_rules.py:182–197  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

180
181
182def main() -> int:
183 issues: list[str] = []
184 files = iter_markdown_files()
185 for path in files:
186 text = path.read_text(encoding="utf-8", errors="ignore")
187 issues.extend(check_fences(path, text))
188 issues.extend(check_links(path, text))
189 issues.extend(check_summary_links())
190
191 unique_issues = sorted(set(issues))
192 if unique_issues:
193 print("\n".join(unique_issues))
194 print(f"\n{len(unique_issues)} issue(s) found across {len(files)} Markdown files.")
195 return 1
196 print(f"All {len(files)} Markdown files passed project checks.")
197 return 0
198
199
200if __name__ == "__main__":

Callers 1

Calls 4

iter_markdown_filesFunction · 0.85
check_fencesFunction · 0.85
check_linksFunction · 0.85
check_summary_linksFunction · 0.85

Tested by

no test coverage detected