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

Function IsOutOfLineMethodDefinition

steps/cpplint.py:5509–5522  ·  view source on GitHub ↗

Check if current line contains an out-of-line method definition. Args: clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. Returns: True if current line contains an out-of-line method definition.

(clean_lines, linenum)

Source from the content-addressed store, hash-verified

5507
5508
5509def IsOutOfLineMethodDefinition(clean_lines, linenum):
5510 """Check if current line contains an out-of-line method definition.
5511
5512 Args:
5513 clean_lines: A CleansedLines instance containing the file.
5514 linenum: The number of the line to check.
5515 Returns:
5516 True if current line contains an out-of-line method definition.
5517 """
5518 # Scan back a few lines for start of current function
5519 for i in xrange(linenum, max(-1, linenum - 10), -1):
5520 if Match(r'^([^()]*\w+)\(', clean_lines.elided[i]):
5521 return Match(r'^[^()]*\w+::\w+\(', clean_lines.elided[i]) is not None
5522 return False
5523
5524
5525def IsInitializerList(clean_lines, linenum):

Callers 1

Calls 1

MatchFunction · 0.85

Tested by

no test coverage detected