chore: remove useless expressions from plugin validation (#2436)

This commit is contained in:
JATMN
2026-10-27 06:24:14 -07:00
committed by GitHub
parent 87f65c5955
commit 85cfaa7345
-10
View File
@@ -31,39 +31,29 @@ export function ValidatePlugin(t0) {
const result = await validateManifest(path);
let output = "";
output = output + `Validating ${result.fileType} manifest: ${result.filePath}\n\n`;
output;
if (result.errors.length > 0) {
output = output + `${figures.cross} Found ${result.errors.length} ${plural(result.errors.length, "error")}:\n\n`;
output;
result.errors.forEach(error_0 => {
output = output + ` ${figures.pointer} ${error_0.path}: ${error_0.message}\n`;
output;
});
output = output + "\n";
output;
}
if (result.warnings.length > 0) {
output = output + `${figures.warning} Found ${result.warnings.length} ${plural(result.warnings.length, "warning")}:\n\n`;
output;
result.warnings.forEach(warning => {
output = output + ` ${figures.pointer} ${warning.path}: ${warning.message}\n`;
output;
});
output = output + "\n";
output;
}
if (result.success) {
if (result.warnings.length > 0) {
output = output + `${figures.tick} Validation passed with warnings\n`;
output;
} else {
output = output + `${figures.tick} Validation passed\n`;
output;
}
process.exitCode = 0;
} else {
output = output + `${figures.cross} Validation failed\n`;
output;
process.exitCode = 1;
}
onComplete(output);