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

Method should_process_file

ci/lint_cpp/bare_libm_checker.py:163–185  ·  view source on GitHub ↗
(self, file_path: str)

Source from the content-addressed store, hash-verified

161 self.violations: dict[str, list[tuple[int, str]]] = {}
162
163 def should_process_file(self, file_path: str) -> bool:
164 if not file_path.startswith(str(SRC_ROOT)):
165 return False
166 if not file_path.endswith((".cpp", ".h", ".hpp")):
167 return False
168 norm = file_path.replace("\\", "/")
169 # The fl::math compat shim is exempt — it IS the wrapper.
170 for exempt in EXEMPT_FILES:
171 if norm.endswith(exempt):
172 return False
173 # Third-party upstream code (stb_vorbis, cq_kernel, etc.) is not
174 # under our authorship; the checker would generate noise.
175 if "/third_party/" in norm:
176 return False
177 # Subsystems still on the migration list (see EXEMPT_PREFIXES). New
178 # code in these directories should still prefer fl::, but the
179 # checker stays silent for now so this PR doesn't block on a 34-file
180 # refactor.
181 for prefix in EXEMPT_PREFIXES:
182 # Match `src/<prefix>` anywhere in the normalized path.
183 if "/src/" + prefix in norm or norm.startswith(prefix):
184 return False
185 return True
186
187 def check_file_content(self, file_content: FileContent) -> list[str]:
188 violations: list[tuple[int, str]] = []

Callers 15

test_fl_headerMethod · 0.45
test_platform_headerMethod · 0.45
test_driver_headerMethod · 0.45
test_platform_sharedMethod · 0.45
test_platform_stubMethod · 0.45
test_hpp_fileMethod · 0.45
test_cpp_hpp_skippedMethod · 0.45
test_cpp_file_skippedMethod · 0.45
test_examples_skippedMethod · 0.45

Calls

no outgoing calls

Tested by 15

test_fl_headerMethod · 0.36
test_platform_headerMethod · 0.36
test_driver_headerMethod · 0.36
test_platform_sharedMethod · 0.36
test_platform_stubMethod · 0.36
test_hpp_fileMethod · 0.36
test_cpp_hpp_skippedMethod · 0.36
test_cpp_file_skippedMethod · 0.36
test_examples_skippedMethod · 0.36