Add info project validator status (#109169)
This commit is contained in:
@@ -76,6 +76,7 @@ class ValidateProject {
|
||||
case StatusProjectValidator.error:
|
||||
icon = '[✗]';
|
||||
break;
|
||||
case StatusProjectValidator.info:
|
||||
case StatusProjectValidator.success:
|
||||
icon = '[✓]';
|
||||
break;
|
||||
|
||||
@@ -153,25 +153,22 @@ class PubDependenciesProjectValidator extends ProjectValidator {
|
||||
}
|
||||
}
|
||||
|
||||
final String value;
|
||||
if (dependencies.isNotEmpty) {
|
||||
final String verb = dependencies.length == 1 ? 'is' : 'are';
|
||||
result.add(
|
||||
ProjectValidatorResult(
|
||||
name: name,
|
||||
value: '${dependencies.join(', ')} $verb not hosted',
|
||||
status: StatusProjectValidator.warning,
|
||||
)
|
||||
);
|
||||
value = '${dependencies.join(', ')} $verb not hosted';
|
||||
} else {
|
||||
result.add(
|
||||
const ProjectValidatorResult(
|
||||
name: name,
|
||||
value: 'All pub dependencies are hosted on https://pub.dartlang.org',
|
||||
status: StatusProjectValidator.success,
|
||||
)
|
||||
);
|
||||
value = 'All pub dependencies are hosted on https://pub.dartlang.org';
|
||||
}
|
||||
|
||||
result.add(
|
||||
ProjectValidatorResult(
|
||||
name: name,
|
||||
value: value,
|
||||
status: StatusProjectValidator.info,
|
||||
)
|
||||
);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ enum StatusProjectValidator {
|
||||
warning,
|
||||
success,
|
||||
crash,
|
||||
info,
|
||||
}
|
||||
|
||||
class ProjectValidatorResult {
|
||||
|
||||
Reference in New Issue
Block a user