Add JSON schema for bloatware list and suggestions

This commit is contained in:
Muntashir Al-Islam
2023-07-15 01:12:59 +06:00
parent 17a484ed71
commit 3e7fa95cbb
4 changed files with 106 additions and 2 deletions

View File

@@ -154,7 +154,7 @@ function validate_bloatware_item(array $item): int {
fprintf($lint_writer, "{$item['id']}: Expected `warning` field to be a string, found: " . gettype($item['warning']) . "\n");
++$error_count;
}
// `warning` is an optional string
// `suggestions` is an optional string
if (isset($item['suggestions'])) {
if (gettype($item['suggestions']) != 'string') {
fprintf($lint_writer, "{$item['id']}: Expected `suggestions` field to be a string, found: " . gettype($item['suggestions']) . "\n");