Skip to content

Commit 4082ef7

Browse files
committed
Standardize member signature when comparing against acceptable undocumented members
Seems different doxygen versions result in slightly different whitepace *inside* the member's signatures!
1 parent 91a792b commit 4082ef7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/code_layout/doxygen_parser.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,13 @@ def hasGroup(self, class_name):
120120
return True
121121
return False
122122

123+
@staticmethod
124+
def standardize_signature(signature):
125+
"""
126+
Standardizes a method's signature for comparison
127+
"""
128+
return signature.lower().replace('* >', '*>').replace('< ', '<')
129+
123130
def parseFile(self, f):
124131
""" Parses a single Doxygen XML file
125132
:param f: XML file path
@@ -153,7 +160,7 @@ def parseFile(self, f):
153160
unacceptable_undocumented = undocumented - set(acceptable_missing)
154161

155162
# do a case insensitive check too
156-
unacceptable_undocumented_insensitive = set([u.lower() for u in undocumented]) - set([u.lower() for u in acceptable_missing])
163+
unacceptable_undocumented_insensitive = set([DoxygenParser.standardize_signature(u) for u in undocumented]) - set([DoxygenParser.standardize_signature(u) for u in acceptable_missing])
157164

158165
if len(unacceptable_undocumented_insensitive) > 0:
159166
self.undocumented_members[class_name] = {}

0 commit comments

Comments
 (0)