MCPcopy Create free account
hub / github.com/Kitware/VTK / CheckWindowsMangling

Method CheckWindowsMangling

Testing/Core/HeaderTesting.py:516–537  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

514 self.Warning("No PrintSelf method")
515
516 def CheckWindowsMangling(self):
517 lines = []
518 regx1 = WindowsMangleRegEx
519 regx2 = re.compile("^.*VTK_LEGACY.*$")
520 # This version will leave out comment lines but we probably do
521 # not want to refer to mangled (hopefully deprecated) methods
522 # in comments.
523 # regx2 = re.compile("^(\\s*//|\\s*\\*|.*VTK_LEGACY).*$")
524 cc = 1
525 for a in self.FileLines:
526 line = a.strip()
527 rm = regx1.match(line)
528 if rm:
529 arg = rm.group(1).strip()
530 if arg and not regx2.match(line):
531 lines.append(" %4d: %s" % (cc, line))
532 cc = cc + 1
533 if len(lines) > 0:
534 self.Print( "File: %s has windows.h mangling violations:" % self.FileName )
535 for a in lines:
536 self.Print(a)
537 self.Error("Windows Mangling Violation - choose another name that does not conflict.")
538
539##
540parser = cli.ArgumentParser()

Callers 1

HeaderTesting.pyFile · 0.80

Calls 6

PrintMethod · 0.95
ErrorMethod · 0.95
compileMethod · 0.80
matchMethod · 0.45
groupMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected