Skip to content

Commit baa0ba2

Browse files
review comments
1 parent 11a6c9f commit baa0ba2

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

lfric_macros/validate_rose_meta.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ def parse_suite_controlled(err_msg):
116116
if line.strip():
117117
err.append(line)
118118
i += 1
119+
# There is always a single line in the error stating the number of failures.
120+
# So only return a non-empty list if there is more than just that line
119121
if len(err) > 1:
120122
return err
121123
return []
@@ -142,6 +144,8 @@ def check_rose_stem_apps(meta_paths, source_path):
142144
if line.startswith("meta="):
143145
break
144146
else:
147+
# We reach here if the for loop hasn't been broken out of. In that case
148+
# we don't want to execut the code below.
145149
continue
146150
command = f"rose macro --validate {meta_paths} -C {app_dir} --no-warn version"
147151
result = run_command(command)
@@ -166,7 +170,9 @@ def parse_args():
166170
Read command line args
167171
"""
168172

169-
parser = argparse.ArgumentParser("Pre-process and apply LFRic Apps upgrade macros.")
173+
parser = argparse.ArgumentParser(
174+
"Validate rose-metadata in LFRic Meta files and apps"
175+
)
170176
parser.add_argument(
171177
"-a",
172178
"--apps",

0 commit comments

Comments
 (0)