Skip to content

Commit

Permalink
Add additional checks during validation (#494)
Browse files Browse the repository at this point in the history
  • Loading branch information
rcalixte committed Aug 26, 2024
1 parent 4ab06d3 commit 517f6e5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions validate-spice
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/python3

import argparse
import glob
import json
import os
import sys
Expand Down Expand Up @@ -35,6 +36,15 @@ def validate_xlet(uuid):
if f"{uuid}{SPICE_EXT}" not in os.listdir('.'):
raise CheckError(f"Missing main {SPICE_EXT} file")

# Check if there are any improperly placed files
for file in glob.glob("*"):
if file.endswith(".po") or file.endswith(".pot"):
raise CheckError(f"[{uuid}] Invalid location for translation files!")

# Check if there is an improperly duplicated file
if len(glob.glob("files/*/po/*.pot")) > 1:
raise CheckError(f"[{uuid}] Too many .pot files!")

# Check forbidden .nemo_action.in format
keyfile = GLib.KeyFile.new()
try:
Expand Down

0 comments on commit 517f6e5

Please sign in to comment.