(lens, file, content, config, builtInRules)
| 187 | if (!/\.(ts|tsx|js|jsx|py|go|rs|css|scss|md)$/.test(file)) continue; |
| 188 | |
| 189 | let content; |
| 190 | try { |
| 191 | content = fs.readFileSync(fullPath, 'utf8'); |
| 192 | } catch { |
| 193 | continue; |
| 194 | } |
| 195 | |
| 196 | const lenses = selectColdPathLenses(file, content); |
| 197 | |
| 198 | for (const lens of lenses) { |
| 199 | const lensViolations = runColdLens(lens, file, content, config, builtInRules); |
| 200 | violations.push(...lensViolations); |
| 201 | } |
| 202 | } |
| 203 | |
| 204 | if (violations.length > 0) { |
| 205 | health.increment('quality-gate', 'violations'); |
| 206 | const msg = [ |
| 207 | `[Quality Gate] ${violations.length} issue(s) in recently modified files:`, |
| 208 | '', |
| 209 | ...violations.map(v => ` ${v.file}: [${v.lens || v.rule}] ${v.message}`), |
| 210 | '', |
| 211 | 'Fix these before finalizing your work.', |
no test coverage detected