MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / matches

Function matches

libatomic/src/review/viewer.js:352–357  ·  view source on GitHub ↗
(region)

Source from the content-addressed store, hash-verified

350 return region.metrics.length > 0 || region.findings.length > 0;
351 }
352 function matches(region) {
353 if (!state.query) return true;
354 const metrics = [...region.metrics, ...region.context_metrics].map(id => byId.get(id)).filter(Boolean).map(node => metricId(node) + ' ' + (metricCards.get(metricId(node))?.title || ''));
355 const text = [region.path, ...region.subjects, ...metrics, numberText(region), ...regionFindings(region).map(item => item.finding.summary + ' ' + item.finding.requirement_or_rule.id), ...region.impact.map(item => item.function?.id || (item.call.caller + ' ' + item.call.callee))].join(' ').toLowerCase();
356 return text.includes(state.query.toLowerCase());
357 }
358 function renderNavigation() {
359 const host = $('files'); host.replaceChildren();
360 if (state.pass === 'conformance') {

Callers 1

renderNavigationFunction · 0.70

Calls 5

metricIdFunction · 0.85
numberTextFunction · 0.85
regionFindingsFunction · 0.85
includesMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected