MCPcopy Create free account
hub / github.com/FastLED/FastLED / _extract_line_number

Function _extract_line_number

ci/ci-iwyu.py:47–50  ·  view source on GitHub ↗

Extract line number from IWYU removal like '#include "foo.h" // lines 3-3'.

(removal_text: str)

Source from the content-addressed store, hash-verified

45
46
47def _extract_line_number(removal_text: str) -> int | None:
48 """Extract line number from IWYU removal like '#include "foo.h" // lines 3-3'."""
49 m = re.search(r"// lines (\d+)", removal_text)
50 return int(m.group(1)) if m else None
51
52
53def _line_has_real_violation(file_path: Path, line_num: int) -> bool:

Callers 3

_scan_one_headerFunction · 0.85
scan_single_fileFunction · 0.85
fix_iwyu_violationsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected