MCPcopy Create free account
hub / github.com/DevCloudNinjas/DevOps-Projects / git_files

Method git_files

tools/quality_gate.py:213–225  ·  view source on GitHub ↗
(self, *patterns: str)

Source from the content-addressed store, hash-verified

211 return findings
212
213 def git_files(self, *patterns: str) -> list[Path]:
214 cmd = ["git", "ls-files", *patterns]
215 result = subprocess.run(
216 cmd,
217 cwd=self.repo_root,
218 check=True,
219 capture_output=True,
220 text=True,
221 )
222 paths = [Path(line) for line in result.stdout.splitlines() if line]
223 if self.project_path is None:
224 return paths
225 return [path for path in paths if path == self.project_path or self.project_path in path.parents]
226
227 def check_tracked_ignored_files(self) -> list[Finding]:
228 result = subprocess.run(

Callers 5

check_secret_patternsMethod · 0.95
check_yaml_syntaxMethod · 0.95
check_shell_syntaxMethod · 0.95
check_python_syntaxMethod · 0.95

Calls 1

runMethod · 0.45

Tested by

no test coverage detected