blob: a31d02e7baa6657c9bc1804dbf584c578c9a319a [file] [log] [blame]
Comran Morshed79bd3db2015-02-07 14:51:13 +00001#!/usr/bin/python3
2
3import os
4import re
5
6path = "../"
7pattern = "TODO(sensors):"
8foundList = []
9
10for r,d,f in os.walk(path):
11 for files in f:
12 try:
13 for n,line in enumerate(open(os.path.join(r,files))):
14 if (pattern in line) and ("checker.py" not in files):
15 comment = line
16 comment = comment.replace(pattern, '')
17 comment = comment.replace('//', '')
18 comment = comment.strip()
19 foundList.append("In file %s at line %d: %s" %(files, n+1, comment))
20 except (UnicodeDecodeError):
21 pass
22if len(foundList) != 0:
23 print ("Found " + str(len(foundList)) + " arbitrary values that need to be found manually.\n")
24 print("Fix these values before running this code on a robot:")
25 for str in foundList:
26 print (str)