({ ruleId, title, file, problem, why, fix })
| 148 | } |
| 149 | |
| 150 | function addFailure({ ruleId, title, file, problem, why, fix }) { |
| 151 | for (const [field, value] of Object.entries({ ruleId, title, file, problem, why, fix })) { |
| 152 | if (typeof value !== "string" || value.trim().length === 0) { |
| 153 | throw new Error(`Invalid repo hygiene failure: missing ${field}.`); |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | failures.push({ ruleId, title, file, problem, why, fix }); |
| 158 | } |
| 159 | |
| 160 | function formatFailure(failure) { |
| 161 | return [ |
no outgoing calls
no test coverage detected