MCPcopy Create free account
hub / github.com/OpenMS/OpenMS / IsOutOfLineMethodDefinition

Function IsOutOfLineMethodDefinition

src/tests/coding/cpplint.py:5496–5509  ·  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

5494
5495
5496def IsOutOfLineMethodDefinition(clean_lines, linenum):
5497 """Check if current line contains an out-of-line method definition.
5498
5499 Args:
5500 clean_lines: A CleansedLines instance containing the file.
5501 linenum: The number of the line to check.
5502 Returns:
5503 True if current line contains an out-of-line method definition.
5504 """
5505 # Scan back a few lines for start of current function
5506 for i in xrange(linenum, max(-1, linenum - 10), -1):
5507 if Match(r'^([^()]*\w+)\(', clean_lines.elided[i]):
5508 return Match(r'^[^()]*\w+::\w+\(', clean_lines.elided[i]) is not None
5509 return False
5510
5511
5512def IsInitializerList(clean_lines, linenum):

Callers 1

Calls 1

MatchFunction · 0.70

Tested by

no test coverage detected