Invalidate the cache when lint fails, forcing a re-run next time.
()
| 106 | |
| 107 | |
| 108 | def invalidate_cpp_cache() -> None: |
| 109 | """Invalidate the cache when lint fails, forcing a re-run next time.""" |
| 110 | cache = _get_cpp_lint_cache() |
| 111 | |
| 112 | try: |
| 113 | cache.invalidate() |
| 114 | print_cache_miss("C++ lint cache invalidated - will re-run linting next time") |
| 115 | except KeyboardInterrupt as ki: |
| 116 | handle_keyboard_interrupt(ki) |
| 117 | raise |
| 118 | except Exception as e: |
| 119 | print_cache_miss(f"Failed to invalidate C++ cache: {e}") |
| 120 | |
| 121 | |
| 122 | def main() -> int: |
no test coverage detected