MCPcopy Index your code
hub / github.com/OWASP/APTS / main

Function main

scripts/validate_yaml.py:8–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6
7
8def main() -> int:
9 yaml_files = git_ls_files("*.yml", "*.yaml")
10
11 if not yaml_files:
12 print("No YAML files found. Skipping YAML validation.")
13 return 0
14
15 failed = False
16
17 for path in yaml_files:
18 print(f"Validating YAML: {display_path(path)}")
19
20 try:
21 yaml.safe_load(read_text(path))
22 except Exception as exc:
23 print(f"FAILED: {display_path(path)}: {exc}")
24 failed = True
25
26 return 1 if failed else 0
27
28
29if __name__ == "__main__":

Callers 1

validate_yaml.pyFile · 0.70

Calls 3

git_ls_filesFunction · 0.90
display_pathFunction · 0.90
read_textFunction · 0.90

Tested by

no test coverage detected