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

Function check_file

ci/lint_python/subprocess_capture_checker.py:98–108  ·  view source on GitHub ↗

Parse source and return all SRC001 violations.

(path: str, source: str)

Source from the content-addressed store, hash-verified

96
97
98def check_file(path: str, source: str) -> list[tuple[int, str]]:
99 """Parse source and return all SRC001 violations."""
100 try:
101 tree = ast.parse(source, filename=path)
102 except SyntaxError:
103 return []
104
105 source_lines = source.split("\n")
106 visitor = SubprocessCaptureVisitor(source_lines)
107 visitor.visit(tree)
108 return visitor.violations
109
110
111def collect_python_files(

Callers 1

mainFunction · 0.70

Calls 3

parseMethod · 0.45
visitMethod · 0.45

Tested by

no test coverage detected