MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / looks_like_header_guard

Function looks_like_header_guard

scripts/check_header_guards.py:77–81  ·  view source on GitHub ↗
(line: str)

Source from the content-addressed store, hash-verified

75# Then
76# It "looks" like a header guard
77def looks_like_header_guard(line: str) -> bool:
78 sline = line.strip()
79 guard_candidate = strip_comments(sline[len("#ifndef"):])
80
81 return is_ifndef(sline) and not guard_candidate.startswith("__") and guard_candidate.isupper()
82
83
84def fix_header_guard(lines: List[str], expected_header_guard: str, comment_style: str) -> Tuple[List[str], bool]:

Callers 1

fix_header_guardFunction · 0.85

Calls 2

strip_commentsFunction · 0.85
is_ifndefFunction · 0.85

Tested by

no test coverage detected