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

Function _is_line_comment

scripts/code-verify.py:902–907  ·  view source on GitHub ↗

True when `line` is a `//` comment line (ignoring leading whitespace). Doxygen `///` and `//!` lines count — they are still single-line `//` style. Block comments (`/* */`, `/** */`) are not flagged here.

(line: str)

Source from the content-addressed store, hash-verified

900
901
902def _is_line_comment(line: str) -> bool:
903 """True when `line` is a `//` comment line (ignoring leading whitespace).
904 Doxygen `///` and `//!` lines count — they are still single-line `//`
905 style. Block comments (`/* */`, `/** */`) are not flagged here."""
906 stripped = line.lstrip()
907 return stripped.startswith("//")
908
909
910_TOOLING_PRAGMA_RE = re.compile(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected