Run checker standalone for all registered subdirs.
()
| 121 | |
| 122 | |
| 123 | def main() -> None: |
| 124 | """Run checker standalone for all registered subdirs.""" |
| 125 | import sys |
| 126 | |
| 127 | from ci.util.check_files import ( |
| 128 | MultiCheckerFileProcessor, |
| 129 | collect_files_to_check, |
| 130 | ) |
| 131 | |
| 132 | had_violations = False |
| 133 | for subdir in ("net", "math", "video", "task"): |
| 134 | checker = SubdirNamespaceChecker(subdir) |
| 135 | desc = f"fl/{subdir}/ headers with incorrect namespace" |
| 136 | files = collect_files_to_check( |
| 137 | [str(PROJECT_ROOT / "src" / "fl" / subdir)], [".h"] |
| 138 | ) |
| 139 | processor = MultiCheckerFileProcessor() |
| 140 | processor.process_files_with_checkers(files, [checker]) |
| 141 | if checker.violations: |
| 142 | had_violations = True |
| 143 | for path, issues in checker.violations.items(): |
| 144 | for lineno, msg in issues: |
| 145 | print(f" {path}:{lineno}: {msg}") |
| 146 | else: |
| 147 | print(f"✅ {desc}: No violations found.") |
| 148 | |
| 149 | sys.exit(1 if had_violations else 0) |
| 150 | |
| 151 | |
| 152 | if __name__ == "__main__": |
no test coverage detected