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

Function _check

ci/tests/test_bare_using_in_headers.py:15–26  ·  view source on GitHub ↗

Run checker on inline code string and return violations. Default path uses a fake absolute path containing /src/fl/ to pass the should_process_file filter.

(code: str, path: str = "/project/src/fl/test.h")

Source from the content-addressed store, hash-verified

13
14
15def _check(code: str, path: str = "/project/src/fl/test.h") -> list[tuple[int, str]]:
16 """Run checker on inline code string and return violations.
17
18 Default path uses a fake absolute path containing /src/fl/ to pass
19 the should_process_file filter.
20 """
21 checker = BareUsingChecker()
22 fc = FileContent(path=path, content=code, lines=code.splitlines())
23 if not checker.should_process_file(path):
24 return []
25 checker.check_file_content(fc)
26 return checker.violations.get(path, [])
27
28
29class TestBareUsingCheckerLogic(unittest.TestCase):

Calls 5

should_process_fileMethod · 0.95
check_file_contentMethod · 0.95
BareUsingCheckerClass · 0.90
FileContentClass · 0.90
getMethod · 0.45

Tested by

no test coverage detected