Skip to content

Commit

Permalink
Update validate_format.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sgbaird committed Apr 5, 2024
1 parent e528ef9 commit 693baf2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions validate_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ def validate_file(file_path):
with open(file_path, "r") as file:
parts = file.read().split("---")
if len(parts) < 3:
print("Invalid file structure. Could not find YAML front matter.")
# print("Invalid file structure. Could not find YAML front matter.")
errors.append("Invalid file structure. Could not find YAML front matter.")
yaml_content, text_content = parts[1], parts[2]

try:
content = yaml.load(yaml_content, Loader=yaml.FullLoader)
except yaml.YAMLError as exc:
print(f"Error in YAML parsing: {exc}")
# print(f"Error in YAML parsing: {exc}")
errors.append(f"Error in YAML parsing: {exc}")

required_fields = [
Expand All @@ -75,7 +75,7 @@ def validate_file(file_path):
]
for field in required_fields:
if field not in content:
print(f"Missing required field: {field}")
# print(f"Missing required field: {field}")
errors.append(f"Missing required field: {field}")

if "team_leads" in content:
Expand Down

0 comments on commit 693baf2

Please sign in to comment.