MCPcopy
hub / github.com/PatrickJS/awesome-cursorrules / addFailure

Function addFailure

scripts/check-repo-hygiene.mjs:150–158  ·  view source on GitHub ↗
({ ruleId, title, file, problem, why, fix })

Source from the content-addressed store, hash-verified

148}
149
150function addFailure({ ruleId, title, file, problem, why, fix }) {
151 for (const [field, value] of Object.entries({ ruleId, title, file, problem, why, fix })) {
152 if (typeof value !== "string" || value.trim().length === 0) {
153 throw new Error(`Invalid repo hygiene failure: missing ${field}.`);
154 }
155 }
156
157 failures.push({ ruleId, title, file, problem, why, fix });
158}
159
160function formatFailure(failure) {
161 return [

Callers 10

checkReadmeSectionsFunction · 0.85
checkReadmeLinksFunction · 0.85
checkRuleFilesFunction · 0.85
checkPromptUnicodeFunction · 0.85
checkRuleFrontmatterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected