MCPcopy Create free account
hub / github.com/alibaba/GraphScope / CheckCompletedBlocks

Method CheckCompletedBlocks

analytical_engine/misc/cpplint.py:3252–3271  ·  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

3250 return None
3251
3252 def CheckCompletedBlocks(self, filename, error):
3253 """Checks that all classes and namespaces have been completely parsed.
3254
3255 Call this when all lines in a file have been processed.
3256 Args:
3257 filename: The name of the current file.
3258 error: The function to call with any errors found.
3259 """
3260 # Note: This test can result in false positives if #ifdef constructs
3261 # get in the way of brace matching. See the testBuildClass test in
3262 # cpplint_unittest.py for an example of this.
3263 for obj in self.stack:
3264 if isinstance(obj, _ClassInfo):
3265 error(filename, obj.starting_linenum, 'build/class', 5,
3266 'Failed to find complete declaration of class %s' %
3267 obj.name)
3268 elif isinstance(obj, _NamespaceInfo):
3269 error(filename, obj.starting_linenum, 'build/namespaces', 5,
3270 'Failed to find complete declaration of namespace %s' %
3271 obj.name)
3272
3273
3274def CheckForNonStandardConstructs(filename, clean_lines, linenum,

Callers 1

ProcessFileDataFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected