MCPcopy Index your code
hub / github.com/nodejs/node / IsOutOfLineMethodDefinition

Function IsOutOfLineMethodDefinition

tools/cpplint.py:6398–6411  ·  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

6396
6397
6398def IsOutOfLineMethodDefinition(clean_lines, linenum):
6399 """Check if current line contains an out-of-line method definition.
6400
6401 Args:
6402 clean_lines: A CleansedLines instance containing the file.
6403 linenum: The number of the line to check.
6404 Returns:
6405 True if current line contains an out-of-line method definition.
6406 """
6407 # Scan back a few lines for start of current function
6408 for i in range(linenum, max(-1, linenum - 10), -1):
6409 if re.match(r"^([^()]*\w+)\(", clean_lines.elided[i]):
6410 return re.match(r"^[^()]*\w+::\w+\(", clean_lines.elided[i]) is not None
6411 return False
6412
6413
6414def IsInitializerList(clean_lines, linenum):

Callers 1

Calls 3

matchMethod · 0.65
rangeFunction · 0.50
maxFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…