Skip to content

Commit

Permalink
coverage: out in :$2: $1" format
Browse files Browse the repository at this point in the history
  • Loading branch information
alama committed Nov 25, 2016
1 parent a67658a commit 9d72c7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions coverage.py
Expand Up @@ -7,7 +7,7 @@
import sys

counterr = 0
bufout = "000.0%:0FILE"
bufout = "000.0%\t0FILE"
invalid_json_files = []
os.chdir(os.getcwd() + "/rmd")
json_files = [f for f in os.listdir('./') if re.match(r'.*\.json', f)]
Expand All @@ -25,9 +25,9 @@
#print ("%s/%s" % (countin, countout))
if (countin):
countper = "{:06.1%}".format(float(countout)/float(countin))
bufout += '\n{0}:{1}'.format(countper,files)
bufout += '\n{0}\t{1}'.format(countper,files)
else:
bufout += '\n{0}:{1}'.format("ERROR ",files)
bufout += '\n{0}\t:{1}'.format("ERROR ",files)
except ValueError as e:
print("%s: %s") % (files, e)
invalid_json_files.append(files)
Expand Down
2 changes: 1 addition & 1 deletion coverage.sh
@@ -1,2 +1,2 @@
#!/bin/sh
python coverage.py | fgrep --invert-match -e "000.0%:0FILE" | sed 's/\.json//' | sort --numeric-sort --reverse
python coverage.py | fgrep --invert-match -e "0FILE" | sed -e 's/\.json//' -e 's/ /_/g' | sort --numeric-sort --reverse | awk '{print $2"\t" $1}' | sed -e 's/_/ /g' -e 's/\t/: /'

0 comments on commit 9d72c7b

Please sign in to comment.