MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / _function_body_lines

Function _function_body_lines

scripts/code_verify_rules.py:1236–1241  ·  view source on GitHub ↗

Number of source lines a `compound_statement` spans (end - start + 1). Returns 0 when the node is missing.

(body_node)

Source from the content-addressed store, hash-verified

1234
1235
1236def _function_body_lines(body_node) -> int:
1237 """Number of source lines a `compound_statement` spans (end - start + 1).
1238 Returns 0 when the node is missing."""
1239 if body_node is None:
1240 return 0
1241 return body_node.end_point[0] - body_node.start_point[0] + 1
1242
1243
1244def _max_nesting_depth(body_node) -> int:

Callers 1

_cpp_rulesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected