MCPcopy Create free account
hub / github.com/PatrickJS/awesome-cursorrules / readOptional

Function readOptional

scripts/check-repo-hygiene.mjs:146–148  ·  view source on GitHub ↗
(filePath)

Source from the content-addressed store, hash-verified

144}
145
146function readOptional(filePath) {
147 return existsSync(filePath) ? readFileSync(filePath, "utf8") : "";
148}
149
150function addFailure({ ruleId, title, file, problem, why, fix }) {
151 for (const [field, value] of Object.entries({ ruleId, title, file, problem, why, fix })) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected