Check that all files using FL_HAS_INCLUDE include fl/stl/has_include.h.
()
| 15 | |
| 16 | |
| 17 | def 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 | |
| 49 | if __name__ == "__main__": |
no test coverage detected