MCPcopy Index your code
hub / github.com/awesome-android-root/awesome-android-root / validateBuild

Function validateBuild

scripts/build-docs.js:187–208  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

185
186 // 8. Validate generated content
187 const validateBuild = () => {
188 const content = fs.readFileSync(INDEX_MD_PATH, 'utf8');
189
190 if (!content || content.trim().length === 0) {
191 handleError("Generated file is empty or does not exist");
192 }
193
194 if (!content.includes('AppSearch')) {
195 logWarn("AppSearch component not found in generated file");
196 }
197
198 if (!content.includes('app-search-content')) {
199 logWarn("Content wrapper not found in generated file");
200 }
201
202 const lineCount = content.split('\n').length;
203 if (lineCount < 100) {
204 logWarn(`Generated file seems too short (only ${lineCount} lines)`);
205 }
206
207 logInfo("Build validation completed");
208 };
209
210 validateBuild();
211

Callers 1

build-docs.jsFile · 0.85

Calls 3

handleErrorFunction · 0.85
logWarnFunction · 0.85
logInfoFunction · 0.85

Tested by

no test coverage detected