MCPcopy Create free account
hub / github.com/SchemaStore/schemastore / formatIssue

Function formatIssue

src/helpers/coverage.js:864–876  ·  view source on GitHub ↗
(item)

Source from the content-addressed store, hash-verified

862// ---------------------------------------------------------------------------
863
864function formatIssue(item) {
865 if (typeof item !== 'object' || item === null) return String(item)
866 if (item.file && item.violations) {
867 return `${item.file}: ${item.violations.join(', ')}`
868 }
869 const parts = [item.path]
870 if (item.type) parts.push(item.type)
871 if (item.values) parts.push(`[${item.values.join(', ')}]`)
872 if (item.pattern) parts.push(`/${item.pattern}/`)
873 if (item.defaultVal !== undefined)
874 parts.push(`default=${JSON.stringify(item.defaultVal)}`)
875 return parts.join(' — ')
876}
877
878/**
879 * @param {string} schemaName

Callers 1

printCoverageReportFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected