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

Function main

ci/lint_cpp/has_include_checker.py:17–46  ·  view source on GitHub ↗

Check that all files using FL_HAS_INCLUDE include fl/stl/has_include.h.

()

Source from the content-addressed store, hash-verified

15
16
17def main() -> int:
18 """Check that all files using FL_HAS_INCLUDE include fl/stl/has_include.h."""
19
20 # Find files using the macro
21 files_with_macro = find_files_using_macro("FL_HAS_INCLUDE")
22
23 # Check which files have the include
24 files_missing_include = {
25 f for f in files_with_macro if not check_has_include(f, "fl/stl/has_include.h")
26 }
27
28 if not files_missing_include:
29 return 0
30
31 # Report errors
32 print(
33 f"❌ {len(files_missing_include)} files use FL_HAS_INCLUDE without including fl/stl/has_include.h:\n",
34 file=sys.stderr,
35 )
36
37 for file_path in sorted(files_missing_include):
38 relative = file_path.relative_to(PROJECT_ROOT)
39 print(f" • {relative}", file=sys.stderr)
40
41 print(
42 f"\n💡 Fix automatically with: uv run python ci/fix_has_include.py --fix\n",
43 file=sys.stderr,
44 )
45
46 return 1
47
48
49if __name__ == "__main__":

Callers 1

Calls 3

find_files_using_macroFunction · 0.90
check_has_includeFunction · 0.90
printFunction · 0.50

Tested by

no test coverage detected