Skip to content

Commit

Permalink
Standardize member signature when comparing against acceptable undocu…
Browse files Browse the repository at this point in the history
…mented members

Seems different doxygen versions result in slightly different whitepace
*inside* the member's signatures!
  • Loading branch information
nyalldawson committed May 23, 2018
1 parent 91a792b commit 4082ef7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/code_layout/doxygen_parser.py
Expand Up @@ -120,6 +120,13 @@ def hasGroup(self, class_name):
return True
return False

@staticmethod
def standardize_signature(signature):
"""
Standardizes a method's signature for comparison
"""
return signature.lower().replace('* >', '*>').replace('< ', '<')

def parseFile(self, f):
""" Parses a single Doxygen XML file
:param f: XML file path
Expand Down Expand Up @@ -153,7 +160,7 @@ def parseFile(self, f):
unacceptable_undocumented = undocumented - set(acceptable_missing)

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

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

0 comments on commit 4082ef7

Please sign in to comment.