Run bare allocation checker standalone.
()
| 194 | |
| 195 | |
| 196 | def main() -> None: |
| 197 | """Run bare allocation checker standalone.""" |
| 198 | from ci.util.check_files import run_checker_standalone |
| 199 | from ci.util.paths import PROJECT_ROOT |
| 200 | |
| 201 | checker = BareAllocationChecker() |
| 202 | run_checker_standalone( |
| 203 | checker, |
| 204 | [ |
| 205 | str(PROJECT_ROOT / "src"), |
| 206 | str(PROJECT_ROOT / "examples"), |
| 207 | str(PROJECT_ROOT / "tests"), |
| 208 | ], |
| 209 | ( |
| 210 | "Found bare heap allocation — use fl::unique_ptr, fl::shared_ptr, " |
| 211 | "or fl::shared_array, or add '// ok bare allocation' comment" |
| 212 | ), |
| 213 | ) |
| 214 | |
| 215 | |
| 216 | if __name__ == "__main__": |
no test coverage detected