Skip to content
Permalink
Browse files

Standardize member signature when comparing against acceptable undocu…

…mented members

Seems different doxygen versions result in slightly different whitepace
*inside* the member's signatures!
  • Loading branch information
nyalldawson committed May 22, 2018
1 parent 91a792b commit 4082ef7fecf2522fd14feed7956646706218becd
Showing with 8 additions and 1 deletion.
  1. +8 −1 tests/code_layout/doxygen_parser.py
@@ -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
@@ -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] = {}

0 comments on commit 4082ef7

Please sign in to comment.
You can’t perform that action at this time.