MCPcopy Create free account
hub / github.com/SethGammon/Citadel / runColdLens

Function runColdLens

hooks_src/quality-gate.js:189–208  ·  view source on GitHub ↗
(lens, file, content, config, builtInRules)

Source from the content-addressed store, hash-verified

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.',

Callers 1

runFunction · 0.85

Calls 7

lensPerformanceFunction · 0.85
lensAccessibilityFunction · 0.85
lensAdversarialFunction · 0.85
lensContractualFunction · 0.85
lensCrossReferenceFunction · 0.85
lensSecretsFunction · 0.85
lensCustomFunction · 0.85

Tested by

no test coverage detected