MCPcopy
hub / github.com/github/awesome-copilot / present

Function present

skills/quality-playbook/quality_gate.py:702–719  ·  view source on GitHub ↗
(base, target_ext)

Source from the content-addressed store, hash-verified

700 excluded = {"vendor", "node_modules", ".git", "quality", "repos"}
701
702 def present(base, target_ext):
703 stack = [(Path(base), 1)]
704 while stack:
705 curr, depth = stack.pop()
706 try:
707 for entry in os.scandir(curr):
708 name = entry.name
709 if entry.is_dir(follow_symlinks=False):
710 if name in excluded:
711 continue
712 if depth < 3:
713 stack.append((Path(entry.path), depth + 1))
714 elif entry.is_file(follow_symlinks=False):
715 if name.endswith(target_ext):
716 return True
717 except (OSError, PermissionError):
718 continue
719 return False
720
721 for lang, ext in language_order:
722 if present(repo_dir, ext):

Callers 1

detect_project_languageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected