def main(argv=None): """Application entry-point. This will read the given coverage data file and prints a JSON object with the following fields to stdout: ``covered`` An array of line numbers that are covered. ``excluded`` An array of line numbers that have been excluded from being subject to coverage checks. ``missing`` An array of line numbers that have not been covered. """ args = parse_args(argv) coverage = Coverage(data_file=str(args.coverage[0])) _, covered, excluded, missing, _ = coverage.analysis2(str(args.file[0])) print(json.dumps({ "covered": covered, "excluded": excluded, "missing": missing, })) return 0
def main(argv=None): """Application entry-point. This will read the given coverage data file and prints a JSON object with the following fields to stdout: ``covered`` An array of line numbers that are covered. ``excluded`` An array of line numbers that have been excluded from being subject to coverage checks. ``missing`` An array of line numbers that have not been covered. """ args = parse_args(argv) coverage = Coverage(data_file=str(args.coverage[0])) coverage.load() _, covered, excluded, missing, _ = coverage.analysis2(str(args.file[0])) print( json.dumps({ "covered": covered, "excluded": excluded, "missing": missing, })) return 0