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

Function runHotLens

hooks_src/post-edit.js:156–176  ·  view source on GitHub ↗
(lens, filePath, relativePath)

Source from the content-addressed store, hash-verified

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
169function 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;

Callers 1

mainFunction · 0.85

Calls 6

typeCheckFunction · 0.85
structuralLintFunction · 0.85
dependencyPatternLintFunction · 0.85
performanceLintFunction · 0.85
designManifestLintFunction · 0.85
docStalenessCheckFunction · 0.85

Tested by

no test coverage detected