1/* 2 * Copyright (c) 2024 - 2025 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15import { Defects } from '../../model/Defects'; 16import Logger, { LOG_MODULE_TYPE } from 'arkanalyzer/lib/utils/logger'; 17 18const logger = Logger.getLogger(LOG_MODULE_TYPE.HOMECHECK, 'CheckEntry'); 19 20namespace DefectsList { 21 let defects: Defects[] = []; 22 23 export function add(defect: Defects): void { 24 defects.push(defect); 25 } 26 27 export function updateDefectByIndex(index: number, defect: Defects): void { 28 defects[index] = defect; 29 } 30 31 export function getDefects(): Defects[] { 32 return defects; 33 } 34 35 export function clear(): void { 36 defects = []; 37 } 38} 39 40 41export class RuleListUtil { 42 static push(defect: Defects): void { 43 } 44 45 static updateDefect(defect: Defects): void { 46 } 47 48 static printDefects(): void { 49 } 50 51 static isFilter(ruleId: string): boolean { 52 return ruleId.startsWith('@ArkTS-eslint'); 53 } 54} 55