( state: XcodebuildRunState, didError: boolean, fallbackErrorMessages?: readonly string[], )
| 122 | } |
| 123 | |
| 124 | function createBasicDiagnostics( |
| 125 | state: XcodebuildRunState, |
| 126 | didError: boolean, |
| 127 | fallbackErrorMessages?: readonly string[], |
| 128 | ): BasicDiagnostics { |
| 129 | const warnings = state.warnings.map((warning) => ({ |
| 130 | message: warning.message, |
| 131 | location: warning.location, |
| 132 | })); |
| 133 | |
| 134 | const errors = didError |
| 135 | ? state.errors.map((error) => ({ |
| 136 | message: error.message, |
| 137 | location: error.location, |
| 138 | })) |
| 139 | : []; |
| 140 | |
| 141 | const rawOutput = didError |
| 142 | ? collectDiagnosticRawOutput(fallbackErrorMessages, errors) |
| 143 | : undefined; |
| 144 | |
| 145 | return { warnings, errors, ...(rawOutput ? { rawOutput } : {}) }; |
| 146 | } |
| 147 | |
| 148 | function createTestDiagnostics( |
| 149 | state: XcodebuildRunState, |
no test coverage detected