mirror of
https://github.com/Gitlawb/openclaude.git
synced 2026-11-06 20:58:14 -04:00
chore: remove useless expressions from plugin validation (#2436)
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user