MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / CheckCompletedBlocks

Method CheckCompletedBlocks

Tools/cpplint.py:2662–2681  ·  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

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

Callers 1

ProcessFileDataFunction · 0.95

Calls 1

errorFunction · 0.50

Tested by

no test coverage detected