Check if C++ files have changed since the last successful lint run. Uses zccache-fingerprint for blake3-based change detection. Returns: True if files changed and C++ linting should run False if no changes detected and linting can be skipped
()
| 64 | |
| 65 | |
| 66 | def check_cpp_files_changed() -> bool: |
| 67 | """ |
| 68 | Check if C++ files have changed since the last successful lint run. |
| 69 | |
| 70 | Uses zccache-fingerprint for blake3-based change detection. |
| 71 | |
| 72 | Returns: |
| 73 | True if files changed and C++ linting should run |
| 74 | False if no changes detected and linting can be skipped |
| 75 | """ |
| 76 | include, exclude = _get_cpp_lint_patterns() |
| 77 | |
| 78 | cache = _get_cpp_lint_cache() |
| 79 | needs_update = cache.check_needs_update(include=include, exclude=exclude) |
| 80 | |
| 81 | if needs_update: |
| 82 | print_cache_miss("C++ files changed - running linting") |
| 83 | return True |
| 84 | else: |
| 85 | print_cache_hit("No C++ changes detected - skipping linting") |
| 86 | return False |
| 87 | |
| 88 | |
| 89 | def mark_cpp_lint_success() -> None: |
no test coverage detected