Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def check_files(files,color,benchmark):
d = CodeChecker( benchmark = benchmark, color = color )
for filename in files:
errors = d.check_file(filename)
# Print benchmark results
if benchmark:
print("\nBenchmark results:")
res = d.benchmark_results
ctime = sum( l[0] for l in res )
for time,n in res:
per = time/ctime * 100.
percentage = ("%.2f%%"% per).rjust(8)
time = ("%4.2fms"% (time*1000.)).rjust(8)
print("%s %s %s" % (percentage,time,n))