MCPcopy Create free account
hub / github.com/dmtcp/dmtcp / CheckCompletedBlocks

Method CheckCompletedBlocks

util/cpplint.py:2663–2682  ·  view source on GitHub ↗

Checks that all classes and namespaces have been completely parsed. Call this when all lines in a file have been processed. Args: filename: The name of the current file. error: The function to call with any errors found.

(self, filename, error)

Source from the content-addressed store, hash-verified

2661 return None
2662
2663 def CheckCompletedBlocks(self, filename, error):
2664 """Checks that all classes and namespaces have been completely parsed.
2665
2666 Call this when all lines in a file have been processed.
2667 Args:
2668 filename: The name of the current file.
2669 error: The function to call with any errors found.
2670 """
2671 # Note: This test can result in false positives if #ifdef constructs
2672 # get in the way of brace matching. See the testBuildClass test in
2673 # cpplint_unittest.py for an example of this.
2674 for obj in self.stack:
2675 if isinstance(obj, _ClassInfo):
2676 error(filename, obj.starting_linenum, 'build/class', 5,
2677 'Failed to find complete declaration of class %s' %
2678 obj.name)
2679 elif isinstance(obj, _NamespaceInfo):
2680 error(filename, obj.starting_linenum, 'build/namespaces', 5,
2681 'Failed to find complete declaration of namespace %s' %
2682 obj.name)
2683
2684
2685def CheckForNonStandardConstructs(filename, clean_lines, linenum,

Callers 1

ProcessFileDataFunction · 0.95

Calls 1

errorFunction · 0.85

Tested by

no test coverage detected