Check if a line contains a real error indicator, not just compiler flags. Returns True for actual error messages like: - "error: undeclared identifier 'foo'" - "FAILED: examples/example-Blink.so" - "fatal error: file not found" - "undefined reference to 'bar'" Retur
(line: str)
| 157 | |
| 158 | |
| 159 | def _is_real_error_line(line: str) -> bool: |
| 160 | """Check if a line contains a real error indicator, not just compiler flags. |
| 161 | |
| 162 | Returns True for actual error messages like: |
| 163 | - "error: undeclared identifier 'foo'" |
| 164 | - "FAILED: examples/example-Blink.so" |
| 165 | - "fatal error: file not found" |
| 166 | - "undefined reference to 'bar'" |
| 167 | |
| 168 | Returns False for compiler flag noise like: |
| 169 | - "-Werror=unused-variable" |
| 170 | - "--print-errorlogs" |
| 171 | """ |
| 172 | for pattern in _REAL_ERROR_PATTERNS: |
| 173 | if pattern.search(line): |
| 174 | return True |
| 175 | return False |
| 176 | |
| 177 | |
| 178 | def extract_error_snippet(accumulated_output: list[str], context_lines: int = 5) -> str: |
no outgoing calls
no test coverage detected