MCPcopy Index your code
hub / github.com/github/awesome-copilot / normalizeReport

Function normalizeReport

extensions/java-modernization-studio/scan.mjs:127–140  ·  view source on GitHub ↗
(raw)

Source from the content-addressed store, hash-verified

125 return out;
126}
127function normalizeReport(raw) {
128 if (!raw || typeof raw !== "object" || Array.isArray(raw)) return null;
129 const findingsIn = Array.isArray(raw.findings) ? raw.findings : [];
130 const findings = [];
131 findingsIn.forEach((f, i) => {
132 const n = normalizeFinding(f, i);
133 if (n) findings.push(n);
134 });
135 const out = { ...raw, findings };
136 if (raw.strengths != null && !Array.isArray(raw.strengths)) {
137 out.strengths = typeof raw.strengths === "string" && raw.strengths ? [raw.strengths] : [];
138 }
139 return out;
140}
141
142function stripMd(s) {
143 return String(s)

Callers 1

scanRepoFunction · 0.85

Calls 1

normalizeFindingFunction · 0.85

Tested by

no test coverage detected