(lens, filePath, relativePath)
| 154 | // Use configured hot lenses or fall back to defaults |
| 155 | const candidates = DEFAULT_HOT_LENSES[ext] || []; |
| 156 | |
| 157 | // Always include dependency and design checks for source files (they're fast) |
| 158 | const lenses = [...candidates]; |
| 159 | if (/\.(ts|tsx|js|jsx)$/.test(filePath) && !lenses.includes('structural')) { |
| 160 | lenses.push('structural'); |
| 161 | } |
| 162 | if (/\.(css|scss|tsx|jsx)$/.test(filePath) && !lenses.includes('visual')) { |
| 163 | lenses.push('visual'); |
| 164 | } |
| 165 | |
| 166 | return lenses.filter(l => !disabled.has(l)); |
| 167 | } |
| 168 | |
| 169 | function runHotLens(lens, filePath, relativePath) { |
| 170 | switch (lens) { |
| 171 | case 'programmatic': |
| 172 | return typeCheck(filePath, relativePath); |
| 173 | case 'structural': |
| 174 | structuralLint(filePath, relativePath); |
| 175 | dependencyPatternLint(filePath, relativePath); |
| 176 | return 0; |
| 177 | case 'performance': |
| 178 | performanceLint(filePath, relativePath); |
| 179 | return 0; |
no test coverage detected