summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/validateinterfaces.py26
1 files changed, 14 insertions, 12 deletions
diff --git a/tools/validateinterfaces.py b/tools/validateinterfaces.py
index 8c794cb7c..a4222adb5 100755
--- a/tools/validateinterfaces.py
+++ b/tools/validateinterfaces.py
@@ -119,18 +119,20 @@ def checkFile(tracker, cFile):
print "Checking: " + cFile
with open(cFile, "r") as r:
for line in r:
- for method in tracker.methods:
- idx = line.find(method)
- if idx > 0:
- if idx + len(method) >= len(line):
- continue
- if checkChr(line[idx + len(method)]):
- continue
- if checkChr(line[idx - 1]):
- continue
- if line[-1] == "\n":
- line = line[:-1]
- tracker.arr[method].append(line)
+ parts = re.findall(r'[\w_]+', line)
+ for part in parts:
+ if part in tracker.methods:
+ idx = line.find(part)
+ if idx > 0:
+ if idx + len(part) >= len(line):
+ continue
+ if checkChr(line[idx + len(part)]):
+ continue
+ if checkChr(line[idx - 1]):
+ continue
+ if line[-1] == "\n":
+ line = line[:-1]
+ tracker.arr[part].append(line)
def processDir(tracker, srcDir):
files = os.listdir(srcDir)