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

Function _has_allowed_std_symbol

ci/lint_cpp/std_namespace_checker.py:71–82  ·  view source on GitHub ↗

Check if a line only contains allowed std:: symbols.

(line: str)

Source from the content-addressed store, hash-verified

69
70
71def _has_allowed_std_symbol(line: str) -> bool:
72 """Check if a line only contains allowed std:: symbols."""
73 # Extract just the code part (before comments)
74 code_part = line.split("//")[0]
75 if "std::" not in code_part:
76 return True
77
78 # Check each std:: occurrence — if ALL are allowed, the line passes
79 import re
80
81 std_usages = re.findall(r"std::\w+", code_part)
82 return all(usage in ALLOWED_STD_SYMBOLS for usage in std_usages)
83
84
85class StdNamespaceChecker(FileContentChecker):

Callers 1

check_file_contentMethod · 0.85

Calls 1

allFunction · 0.85

Tested by

no test coverage detected