mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Show invalid coverage paths with verbosity > 1.
This commit is contained in:
@@ -139,6 +139,8 @@ def command_coverage_combine(args):
|
||||
arc_data[filename].update(arcs)
|
||||
|
||||
output_files = []
|
||||
invalid_path_count = 0
|
||||
invalid_path_chars = 0
|
||||
|
||||
for group in sorted(groups):
|
||||
arc_data = groups[group]
|
||||
@@ -147,7 +149,12 @@ def command_coverage_combine(args):
|
||||
|
||||
for filename in arc_data:
|
||||
if not os.path.isfile(filename):
|
||||
display.warning('Invalid coverage path: %s' % filename)
|
||||
invalid_path_count += 1
|
||||
invalid_path_chars += len(filename)
|
||||
|
||||
if args.verbosity > 1:
|
||||
display.warning('Invalid coverage path: %s' % filename)
|
||||
|
||||
continue
|
||||
|
||||
updated.add_arcs({filename: list(arc_data[filename])})
|
||||
@@ -160,6 +167,9 @@ def command_coverage_combine(args):
|
||||
updated.write_file(output_file)
|
||||
output_files.append(output_file)
|
||||
|
||||
if invalid_path_count > 0:
|
||||
display.warning('Ignored %d characters from %d invalid coverage path(s).' % (invalid_path_chars, invalid_path_count))
|
||||
|
||||
return sorted(output_files)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user