Muntashir Al-Islam 754c35cc16 Fix mislabeled items
Signed-off-by: Muntashir Al-Islam <muntashirakon@riseup.net>
2023-07-21 00:53:51 +06:00

227 lines
9.0 KiB
PHP

<?php
/* SPDX-License-Identifier: AGPL-3.0-or-later */
const SUPPORTED_REMOVAL_TYPES = ['delete', 'replace', 'caution', 'unsafe'];
const SUPPORTED_TAGS = [];
const SUPPRESS_LINT_CONST_LABEL_SAME_AS_ID = 'LabelSameAsId';
const SUPPRESS_LINT_CONSTS = [SUPPRESS_LINT_CONST_LABEL_SAME_AS_ID];
const REPO_DIR = __DIR__ . "/..";
const SUGGESTIONS_DIR = REPO_DIR . '/suggestions';
const LINT_DIR = __DIR__ . "/../build";
if (!file_exists(LINT_DIR)) {
mkdir(LINT_DIR, 0777, true);
}
$lint_writer = fopen(LINT_DIR . "/lint-results.txt", "w");
// START MAIN
$error_count = 0;
foreach (scandir(REPO_DIR) as $filename) {
if (!str_ends_with($filename, ".json")) {
continue;
}
$file = REPO_DIR . '/' . $filename;
$type = substr($filename, 0, -5);
try {
$list = json_decode(</