From 3c202958c92c4e6c263be06030cd055db442a7a9 Mon Sep 17 00:00:00 2001 From: ZhongNing Date: Tue, 10 Jun 2025 11:51:04 +0800 Subject: [PATCH] fix issue for arkts-runtime-array-check Issue: https://gitee.com/openharmony/arkcompiler_ets_frontend/issues/ICCYL6 Test scenarios: arkts-runtime-array-check Signed-off-by: ZhongNing --- ets2panda/linter/src/lib/TypeScriptLinter.ts | 138 +++- ets2panda/linter/src/lib/utils/TsUtils.ts | 11 + .../interop_import_js_rules.ets.arkts2.json | 10 - .../interop_import_js_rules.ets.autofix.json | 10 - .../linter/test/main/runtime_array_bound.ets | 93 ++- .../main/runtime_array_bound.ets.args.json | 3 +- .../main/runtime_array_bound.ets.arkts2.json | 620 ++++++++++++++++-- 7 files changed, 778 insertions(+), 107 deletions(-) diff --git a/ets2panda/linter/src/lib/TypeScriptLinter.ts b/ets2panda/linter/src/lib/TypeScriptLinter.ts index ec2c5e4463..1e7f153c9a 100644 --- a/ets2panda/linter/src/lib/TypeScriptLinter.ts +++ b/ets2panda/linter/src/lib/TypeScriptLinter.ts @@ -946,7 +946,6 @@ export class TypeScriptLinter extends BaseTypeScriptLinter { return; } if (!loopCondition) { - this.incrementCounters(arrayAccessInfo.arrayIdent.parent, FaultID.RuntimeArrayCheck); return; } const arraySymbol = this.tsUtils.trueSymbolAtLocation(arrayAccessInfo.arrayIdent); @@ -956,7 +955,6 @@ export class TypeScriptLinter extends BaseTypeScriptLinter { const arrayCheckedAgainst = this.checkConditionForArrayAccess(loopCondition, arraySymbol); if (!arrayCheckedAgainst) { - this.incrementCounters(arrayAccessInfo.arrayIdent.parent, FaultID.RuntimeArrayCheck); return; } @@ -966,16 +964,7 @@ export class TypeScriptLinter extends BaseTypeScriptLinter { private checkIfAccessAndCheckVariablesMatch(accessInfo: ArrayAccess, checkedAgainst: CheckedIdentifier): void { const { arrayIdent, accessingIdentifier } = accessInfo; - if (accessingIdentifier === NUMBER_LITERAL) { - if (checkedAgainst === NUMBER_LITERAL) { - return; - } - this.incrementCounters(arrayIdent.parent, FaultID.RuntimeArrayCheck); - return; - } - - if (checkedAgainst === NUMBER_LITERAL) { - this.incrementCounters(arrayIdent.parent, FaultID.RuntimeArrayCheck); + if (accessingIdentifier === NUMBER_LITERAL || checkedAgainst === NUMBER_LITERAL) { return; } @@ -987,7 +976,6 @@ export class TypeScriptLinter extends BaseTypeScriptLinter { const accessingIdentSym = this.tsUtils.trueSymbolAtLocation(accessingIdentifier); if (checkedAgainstSym !== accessingIdentSym) { - this.incrementCounters(arrayIdent.parent, FaultID.RuntimeArrayCheck); return; } @@ -1074,8 +1062,19 @@ export class TypeScriptLinter extends BaseTypeScriptLinter { if (!arraySym) { return; } + + const indexExpr = accessExpr.argumentExpression; + const indexVarName = ts.isIdentifier(indexExpr) ? indexExpr.text : null; const sourceFile = arrayIdent.getSourceFile(); let boundChecked = true; + let hasSafeLengthCheck = false; + if (indexVarName) { + hasSafeLengthCheck = TypeScriptLinter.checkForSafeLengthCheck(accessExpr, arrayIdent, indexVarName); + } + + if (hasSafeLengthCheck) { + return; + } for (const statement of sourceFile.statements) { const checkResult = this.checkStatementForArrayAccess(statement, arrayAccessInfo, arraySym); @@ -1099,6 +1098,119 @@ export class TypeScriptLinter extends BaseTypeScriptLinter { } } + static checkForSafeLengthCheck( + accessExpr: ts.ElementAccessExpression, + arrayIdent: ts.Identifier, + indexVarName: string + ): boolean { + const containingFunction = TsUtils.findContainingFunction(accessExpr); + if (!containingFunction) { + return false; + } + + const statements = + containingFunction.body && ts.isBlock(containingFunction.body) ? containingFunction.body.statements : []; + const accessPos = accessExpr.getStart(); + let hasLengthCheck = false; + let indexModifiedAfterCheck = false; + + for (const statement of statements) { + if (statement.getStart() >= accessPos) { + continue; + } + + if (TypeScriptLinter.checkForIndexModification(statement, indexVarName)) { + if (hasLengthCheck) { + indexModifiedAfterCheck = true; + } + continue; + } + + if (ts.isIfStatement(statement)) { + if (TypeScriptLinter.containsLengthCheck(statement.expression, arrayIdent.text, indexVarName)) { + hasLengthCheck = true; + } + } + + if (ts.isReturnStatement(statement) && statement.expression) { + if (TypeScriptLinter.containsLengthCheck(statement.expression, arrayIdent.text, indexVarName)) { + hasLengthCheck = true; + } + } + } + + return hasLengthCheck && !indexModifiedAfterCheck; + } + + static isArrayLengthPropertyAccess(node: ts.Node, arrayName: string): boolean { + return ( + ts.isPropertyAccessExpression(node) && + ts.isIdentifier(node.expression) && + node.expression.text === arrayName && + node.name.text === 'length' + ); + } + + static containsLengthCheck(expr: ts.Expression, arrayName: string, indexVarName: string): boolean { + let found = false; + + const visit = (node: ts.Node): void => { + if (found) { + return; + } + + if (ts.isBinaryExpression(node)) { + const leftHasLength = TypeScriptLinter.isArrayLengthPropertyAccess(node.left, arrayName); + const rightHasIndex = ts.isIdentifier(node.right) && node.right.text === indexVarName; + + const rightHasLength = TypeScriptLinter.isArrayLengthPropertyAccess(node.right, arrayName); + const leftHasIndex = ts.isIdentifier(node.left) && node.left.text === indexVarName; + + if (leftHasLength && rightHasIndex || rightHasLength && leftHasIndex) { + found = true; + } + } + + ts.forEachChild(node, visit); + }; + + visit(expr); + return found; + } + + static checkForIndexModification(statement: ts.Statement, indexVarName: string): boolean { + let isModified = false; + + const visit = (node: ts.Node): void => { + if (isModified) { + return; + } + + if ( + ts.isBinaryExpression(node) && + node.operatorToken.kind === ts.SyntaxKind.EqualsToken && + ts.isIdentifier(node.left) && + node.left.text === indexVarName + ) { + isModified = true; + } + + if ( + (ts.isPrefixUnaryExpression(node) || ts.isPostfixUnaryExpression(node)) && + (node.operator === ts.SyntaxKind.PlusPlusToken || node.operator === ts.SyntaxKind.MinusMinusToken) && + ts.isIdentifier(node.operand) && + node.operand.text === indexVarName + ) { + isModified = true; + } + + ts.forEachChild(node, visit); + }; + + visit(statement); + return isModified; + } + private checkStatementForArrayAccess( statement: ts.Statement, accessInfo: ArrayAccess, diff --git a/ets2panda/linter/src/lib/utils/TsUtils.ts b/ets2panda/linter/src/lib/utils/TsUtils.ts index 5ed15ab452..e7255ecb2a 100644 --- a/ets2panda/linter/src/lib/utils/TsUtils.ts +++ b/ets2panda/linter/src/lib/utils/TsUtils.ts @@ -3805,4 +3805,15 @@ export class TsUtils { forEachNodeInSubtree(targetNode, callback, stopCondition); return found; } + + static findContainingFunction(node: ts.Node): ts.FunctionLikeDeclaration | undefined { + let parent = node.parent; + while (parent) { + if (ts.isFunctionDeclaration(parent) || ts.isFunctionExpression(parent) || ts.isMethodDeclaration(parent)) { + return parent; + } + parent = parent.parent; + } + return undefined; + } } diff --git a/ets2panda/linter/test/interop/interop_import_js_rules.ets.arkts2.json b/ets2panda/linter/test/interop/interop_import_js_rules.ets.arkts2.json index 2fdc4e604e..19386e44f0 100644 --- a/ets2panda/linter/test/interop/interop_import_js_rules.ets.arkts2.json +++ b/ets2panda/linter/test/interop/interop_import_js_rules.ets.arkts2.json @@ -294,16 +294,6 @@ "rule": "Properties of interop objects can't be accessed directly (arkts-interop-js2s-access-js-prop)", "severity": "ERROR" }, - { - "line": 54, - "column": 3, - "endLine": 54, - "endColumn": 9, - "problem": "RuntimeArrayCheck", - "suggest": "", - "rule": "Array bound not checked. (arkts-runtime-array-check)", - "severity": "ERROR" - }, { "line": 52, "column": 10, diff --git a/ets2panda/linter/test/interop/interop_import_js_rules.ets.autofix.json b/ets2panda/linter/test/interop/interop_import_js_rules.ets.autofix.json index 415bd82dc4..4c417e0271 100644 --- a/ets2panda/linter/test/interop/interop_import_js_rules.ets.autofix.json +++ b/ets2panda/linter/test/interop/interop_import_js_rules.ets.autofix.json @@ -540,16 +540,6 @@ "rule": "Properties of interop objects can't be accessed directly (arkts-interop-js2s-access-js-prop)", "severity": "ERROR" }, - { - "line": 54, - "column": 3, - "endLine": 54, - "endColumn": 9, - "problem": "RuntimeArrayCheck", - "suggest": "", - "rule": "Array bound not checked. (arkts-runtime-array-check)", - "severity": "ERROR" - }, { "line": 52, "column": 10, diff --git a/ets2panda/linter/test/main/runtime_array_bound.ets b/ets2panda/linter/test/main/runtime_array_bound.ets index 435c6ac0e6..b796af52fa 100644 --- a/ets2panda/linter/test/main/runtime_array_bound.ets +++ b/ets2panda/linter/test/main/runtime_array_bound.ets @@ -17,43 +17,43 @@ const arr: int[] = [1, 2, 3, 4]; for (let i = 0; i < arr.length; i++) { - arr[i]; //legal + arr[i]; //legal 不告警 } for (let i = 0; i < 100; i++) { - console.log(i); //legal + console.log(i); //legal 不告警 } const arr2: int[] = [1, 2, 3, 4]; for (let i = 0; i < 100; i++) { - arr2[10] //should report + arr2[10] //should report 不告警 } const arr3: int[] = [1, 2, 3, 4]; for (let i = 0; i < arr3.length; i++) { - arr3[10] //should report + arr3[10] //should report 不告警 } const arr4: int[] = [1, 2, 3, 4]; let x: int = 3; for (let i = 0; i < arr4.length; i++) { - arr4[x]; //should report + arr4[x]; //should report 不告警 } const arr5: int[] = [1, 2, 3, 4]; for (let i = 0; i < 10; i++) { - arr5[i]; //should report + arr5[i]; //should report 不告警 } const arr6: int[] = [1, 2, 3, 4]; if (arr6.length > 10) { - arr6[10] + arr6[10] //不告警 } const arr7: int[] = [1, 2, 3, 4]; if (arr7.length > 10) { - return; + return; //不告警 } arr7[10] @@ -64,16 +64,16 @@ if (arr8.length > 10 && index > 0) { return; } -arr8[index]; +arr8[index]; //不告警 const arr9: int[] = [1, 2, 3, 4]; if (arr9.length > 10 && index > 0) { - arr9[index]; + arr9[index]; //不告警 } const arr10: int[] = [1, 2, 3, 4]; if (index > 0) { - arr10[index]; + arr10[index]; //告警 } const arr10: int[] = [1, 2, 3, 4]; @@ -84,7 +84,76 @@ if (arr10.length > newIndex) { newIndex = 22; -arr10[newIndex]; +arr10[newIndex]; //告警 + +//Case 1 +let arr1 = [1, 2, 3, 4, 5] + +if(arr1.length > 10) { +arr1[10]; //不告警 +} +//Case 2 +for(let i = 0; i < arr1.length; i++) { +arr1[i]; //不告警 +} + +//Case3 +function foo(index:int) { +let arr1 = [1, 2, 3, 4, 5]; +if(index < arr1.length) { +arr1[index]; //不告警 +} +} + +//Case4 +function foo(index:int) { +let arr1 = [1, 2, 3, 4, 5]; +if(index > arr1.length) { +return; +} +arr1[index]; //不告警 +} + +//Case5 +function foo(index:int) { +let arr1 = [1, 2, 3, 4, 5]; +if(index > arr1.length) { +return; +} +index = 10; +arr1[index]; //告警 +} + +// case6 表达式 +let arr1:number[] = [1, 1.5,45,2] + +function foo(i:number):number{ +return i; +} + +arr1[3*5] = 23; // 漏报 +arr1[parseInt("16")] = 23; // 漏报 +arr1[foo(16)] = 23 // 漏报 +// case7 下标是特殊数字 +let arr1:number[] = [1, 1.5,45,2] + +arr1[Number.MAX_VALUE] = 23; // 漏报 +arr1[Number.MAX_SAFE_INTEGER] = 23; // 漏报 + +// case8 下标是有括号,有+号,是枚举值 +// 联合类型 +let arr1:number[] = [1, 1.5,45,2] + +function foo(i:number):number{ +return i; +} + +arr1[(24)] = 23; // 漏报 +arr1[+24] = 23; // 漏报 +enum TE{ +AA = 12 +} +arr1[TE.AA] = 12; // 漏报 diff --git a/ets2panda/linter/test/main/runtime_array_bound.ets.args.json b/ets2panda/linter/test/main/runtime_array_bound.ets.args.json index 8a4be28991..66fb88f859 100644 --- a/ets2panda/linter/test/main/runtime_array_bound.ets.args.json +++ b/ets2panda/linter/test/main/runtime_array_bound.ets.args.json @@ -14,7 +14,6 @@ "limitations under the License." ], "mode": { - "arkts2": "", - "migrate": "--arkts-2" + "arkts2": "" } } diff --git a/ets2panda/linter/test/main/runtime_array_bound.ets.arkts2.json b/ets2panda/linter/test/main/runtime_array_bound.ets.arkts2.json index ee17b482f0..92c32347f6 100644 --- a/ets2panda/linter/test/main/runtime_array_bound.ets.arkts2.json +++ b/ets2panda/linter/test/main/runtime_array_bound.ets.arkts2.json @@ -144,16 +144,6 @@ "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", "severity": "ERROR" }, - { - "line": 29, - "column": 5, - "endLine": 29, - "endColumn": 13, - "problem": "RuntimeArrayCheck", - "suggest": "", - "rule": "Array bound not checked. (arkts-runtime-array-check)", - "severity": "ERROR" - }, { "line": 28, "column": 10, @@ -224,16 +214,6 @@ "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", "severity": "ERROR" }, - { - "line": 34, - "column": 5, - "endLine": 34, - "endColumn": 13, - "problem": "RuntimeArrayCheck", - "suggest": "", - "rule": "Array bound not checked. (arkts-runtime-array-check)", - "severity": "ERROR" - }, { "line": 33, "column": 10, @@ -304,16 +284,6 @@ "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", "severity": "ERROR" }, - { - "line": 40, - "column": 5, - "endLine": 40, - "endColumn": 12, - "problem": "RuntimeArrayCheck", - "suggest": "", - "rule": "Array bound not checked. (arkts-runtime-array-check)", - "severity": "ERROR" - }, { "line": 39, "column": 10, @@ -374,16 +344,6 @@ "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", "severity": "ERROR" }, - { - "line": 45, - "column": 5, - "endLine": 45, - "endColumn": 12, - "problem": "RuntimeArrayCheck", - "suggest": "", - "rule": "Array bound not checked. (arkts-runtime-array-check)", - "severity": "ERROR" - }, { "line": 44, "column": 10, @@ -584,16 +544,6 @@ "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", "severity": "ERROR" }, - { - "line": 67, - "column": 1, - "endLine": 67, - "endColumn": 12, - "problem": "RuntimeArrayCheck", - "suggest": "", - "rule": "Array bound not checked. (arkts-runtime-array-check)", - "severity": "ERROR" - }, { "line": 69, "column": 22, @@ -634,16 +584,6 @@ "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", "severity": "ERROR" }, - { - "line": 71, - "column": 5, - "endLine": 71, - "endColumn": 16, - "problem": "RuntimeArrayCheck", - "suggest": "", - "rule": "Array bound not checked. (arkts-runtime-array-check)", - "severity": "ERROR" - }, { "line": 70, "column": 19, @@ -803,6 +743,566 @@ "suggest": "", "rule": "Array bound not checked. (arkts-runtime-array-check)", "severity": "ERROR" + }, + { + "line": 90, + "column": 5, + "endLine": 90, + "endColumn": 27, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 90, + "column": 13, + "endLine": 90, + "endColumn": 14, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 90, + "column": 16, + "endLine": 90, + "endColumn": 17, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 90, + "column": 19, + "endLine": 90, + "endColumn": 20, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 90, + "column": 22, + "endLine": 90, + "endColumn": 23, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 90, + "column": 25, + "endLine": 90, + "endColumn": 26, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 92, + "column": 18, + "endLine": 92, + "endColumn": 20, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 96, + "column": 9, + "endLine": 96, + "endColumn": 14, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 96, + "column": 13, + "endLine": 96, + "endColumn": 14, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 101, + "column": 1, + "endLine": 106, + "endColumn": 2, + "problem": "TsOverload", + "suggest": "", + "rule": "Class TS overloading is not supported(arkts-no-ts-overload)", + "severity": "ERROR" + }, + { + "line": 102, + "column": 5, + "endLine": 102, + "endColumn": 27, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 102, + "column": 13, + "endLine": 102, + "endColumn": 14, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 102, + "column": 16, + "endLine": 102, + "endColumn": 17, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 102, + "column": 19, + "endLine": 102, + "endColumn": 20, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 102, + "column": 22, + "endLine": 102, + "endColumn": 23, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 102, + "column": 25, + "endLine": 102, + "endColumn": 26, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 109, + "column": 1, + "endLine": 115, + "endColumn": 2, + "problem": "TsOverload", + "suggest": "", + "rule": "Class TS overloading is not supported(arkts-no-ts-overload)", + "severity": "ERROR" + }, + { + "line": 110, + "column": 5, + "endLine": 110, + "endColumn": 27, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 110, + "column": 13, + "endLine": 110, + "endColumn": 14, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 110, + "column": 16, + "endLine": 110, + "endColumn": 17, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 110, + "column": 19, + "endLine": 110, + "endColumn": 20, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 110, + "column": 22, + "endLine": 110, + "endColumn": 23, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 110, + "column": 25, + "endLine": 110, + "endColumn": 26, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 118, + "column": 1, + "endLine": 125, + "endColumn": 2, + "problem": "TsOverload", + "suggest": "", + "rule": "Class TS overloading is not supported(arkts-no-ts-overload)", + "severity": "ERROR" + }, + { + "line": 119, + "column": 5, + "endLine": 119, + "endColumn": 27, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 119, + "column": 13, + "endLine": 119, + "endColumn": 14, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 119, + "column": 16, + "endLine": 119, + "endColumn": 17, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 119, + "column": 19, + "endLine": 119, + "endColumn": 20, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 119, + "column": 22, + "endLine": 119, + "endColumn": 23, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 119, + "column": 25, + "endLine": 119, + "endColumn": 26, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 123, + "column": 9, + "endLine": 123, + "endColumn": 11, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 124, + "column": 1, + "endLine": 124, + "endColumn": 12, + "problem": "RuntimeArrayCheck", + "suggest": "", + "rule": "Array bound not checked. (arkts-runtime-array-check)", + "severity": "ERROR" + }, + { + "line": 128, + "column": 22, + "endLine": 128, + "endColumn": 23, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 128, + "column": 29, + "endLine": 128, + "endColumn": 31, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 128, + "column": 32, + "endLine": 128, + "endColumn": 33, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 130, + "column": 1, + "endLine": 132, + "endColumn": 2, + "problem": "TsOverload", + "suggest": "", + "rule": "Class TS overloading is not supported(arkts-no-ts-overload)", + "severity": "ERROR" + }, + { + "line": 134, + "column": 13, + "endLine": 134, + "endColumn": 15, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 135, + "column": 6, + "endLine": 135, + "endColumn": 20, + "problem": "ArrayIndexExprType", + "suggest": "", + "rule": "The index expression must be of a numeric type (arkts-array-index-expr-type)", + "severity": "ERROR" + }, + { + "line": 135, + "column": 24, + "endLine": 135, + "endColumn": 26, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 136, + "column": 6, + "endLine": 136, + "endColumn": 13, + "problem": "ArrayIndexExprType", + "suggest": "", + "rule": "The index expression must be of a numeric type (arkts-array-index-expr-type)", + "severity": "ERROR" + }, + { + "line": 136, + "column": 6, + "endLine": 136, + "endColumn": 13, + "problem": "LimitedVoidType", + "suggest": "", + "rule": "Type \"void\" has no instances.(arkts-limited-void-type)", + "severity": "ERROR" + }, + { + "line": 136, + "column": 17, + "endLine": 136, + "endColumn": 19, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 139, + "column": 22, + "endLine": 139, + "endColumn": 23, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 139, + "column": 29, + "endLine": 139, + "endColumn": 31, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 139, + "column": 32, + "endLine": 139, + "endColumn": 33, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 141, + "column": 6, + "endLine": 141, + "endColumn": 22, + "problem": "ArrayIndexExprType", + "suggest": "", + "rule": "The index expression must be of a numeric type (arkts-array-index-expr-type)", + "severity": "ERROR" + }, + { + "line": 141, + "column": 26, + "endLine": 141, + "endColumn": 28, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 142, + "column": 6, + "endLine": 142, + "endColumn": 29, + "problem": "ArrayIndexExprType", + "suggest": "", + "rule": "The index expression must be of a numeric type (arkts-array-index-expr-type)", + "severity": "ERROR" + }, + { + "line": 142, + "column": 33, + "endLine": 142, + "endColumn": 35, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 146, + "column": 22, + "endLine": 146, + "endColumn": 23, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 146, + "column": 29, + "endLine": 146, + "endColumn": 31, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 146, + "column": 32, + "endLine": 146, + "endColumn": 33, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 148, + "column": 1, + "endLine": 150, + "endColumn": 2, + "problem": "TsOverload", + "suggest": "", + "rule": "Class TS overloading is not supported(arkts-no-ts-overload)", + "severity": "ERROR" + }, + { + "line": 152, + "column": 14, + "endLine": 152, + "endColumn": 16, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 153, + "column": 13, + "endLine": 153, + "endColumn": 15, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 157, + "column": 15, + "endLine": 157, + "endColumn": 17, + "problem": "NumericSemantics", + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" } ] } \ No newline at end of file -- Gitee