MCPcopy Create free account
hub / github.com/4paradigm/OpenMLDB / CheckCompletedBlocks

Method CheckCompletedBlocks

steps/cpplint.py:3263–3282  ·  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

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

Callers 1

ProcessFileDataFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected