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

Function GetIndentLevel

tools/cpplint.py:2499–2510  ·  view source on GitHub ↗

Return the number of leading spaces in line. Args: line: A string to check. Returns: An integer count of leading spaces, possibly zero.

(line)

Source from the content-addressed store, hash-verified

2497
2498
2499def GetIndentLevel(line):
2500 """Return the number of leading spaces in line.
2501
2502 Args:
2503 line: A string to check.
2504
2505 Returns:
2506 An integer count of leading spaces, possibly zero.
2507 """
2508 if indent := re.match(r"^( *)\S", line):
2509 return len(indent.group(1))
2510 return 0
2511
2512
2513def PathSplitToList(path):

Callers 2

__init__Method · 0.85
CheckBracesFunction · 0.85

Calls 1

matchMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…