diff --git a/ets2panda/linter/src/lib/utils/TsUtils.ts b/ets2panda/linter/src/lib/utils/TsUtils.ts index db9e766033add2d72cf30c8f2f477b363aa9e1d9..9ad8e8fd1cafcafc1e47e9802fc8cbb1dd9bfb7c 100644 --- a/ets2panda/linter/src/lib/utils/TsUtils.ts +++ b/ets2panda/linter/src/lib/utils/TsUtils.ts @@ -2954,6 +2954,13 @@ export class TsUtils { if (TsUtils.hasModifier(ts.getModifiers(propDecl.parent), ts.SyntaxKind.ExportKeyword)) { return false; } + + if ( + ts.isStringLiteral(propDecl.name) && + (ts.isClassDeclaration(propDecl.parent) || ts.isInterfaceDeclaration(propDecl.parent)) + ) { + return false; + } } return true; diff --git a/ets2panda/linter/test/main/literals_as_prop_names.ets.autofix.json b/ets2panda/linter/test/main/literals_as_prop_names.ets.autofix.json index f3414d739de19184996435dcab30d7a8d61c643f..f312b3c43fc9ab888307017efb2df9842bb1c39c 100644 --- a/ets2panda/linter/test/main/literals_as_prop_names.ets.autofix.json +++ b/ets2panda/linter/test/main/literals_as_prop_names.ets.autofix.json @@ -89,35 +89,6 @@ "endLine": 27, "endColumn": 8, "problem": "LiteralAsPropertyName", - "autofix": [ - { - "replacementText": "Two", - "start": 849, - "end": 854, - "line": 38, - "column": 13, - "endLine": 38, - "endColumn": 33 - }, - { - "replacementText": "Two", - "start": 940, - "end": 945, - "line": 38, - "column": 13, - "endLine": 38, - "endColumn": 33 - }, - { - "replacementText": "litAsPropName.Two", - "start": 1032, - "end": 1052, - "line": 38, - "column": 13, - "endLine": 38, - "endColumn": 33 - } - ], "suggest": "", "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)", "severity": "ERROR" @@ -167,35 +138,6 @@ "endLine": 33, "endColumn": 8, "problem": "LiteralAsPropertyName", - "autofix": [ - { - "replacementText": "Two", - "start": 849, - "end": 854, - "line": 38, - "column": 13, - "endLine": 38, - "endColumn": 33 - }, - { - "replacementText": "Two", - "start": 940, - "end": 945, - "line": 38, - "column": 13, - "endLine": 38, - "endColumn": 33 - }, - { - "replacementText": "litAsPropName.Two", - "start": 1032, - "end": 1052, - "line": 38, - "column": 13, - "endLine": 38, - "endColumn": 33 - } - ], "suggest": "", "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)", "severity": "ERROR" @@ -287,35 +229,6 @@ "endLine": 38, "endColumn": 33, "problem": "PropertyAccessByIndex", - "autofix": [ - { - "replacementText": "Two", - "start": 849, - "end": 854, - "line": 38, - "column": 13, - "endLine": 38, - "endColumn": 33 - }, - { - "replacementText": "Two", - "start": 940, - "end": 945, - "line": 38, - "column": 13, - "endLine": 38, - "endColumn": 33 - }, - { - "replacementText": "litAsPropName.Two", - "start": 1032, - "end": 1052, - "line": 38, - "column": 13, - "endLine": 38, - "endColumn": 33 - } - ], "suggest": "", "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)", "severity": "ERROR" @@ -541,26 +454,6 @@ "endLine": 76, "endColumn": 8, "problem": "LiteralAsPropertyName", - "autofix": [ - { - "replacementText": "__2", - "start": 1739, - "end": 1744, - "line": 81, - "column": 3, - "endLine": 81, - "endColumn": 8 - }, - { - "replacementText": "__2", - "start": 1824, - "end": 1829, - "line": 81, - "column": 3, - "endLine": 81, - "endColumn": 8 - } - ], "suggest": "", "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)", "severity": "ERROR" @@ -611,26 +504,6 @@ "endLine": 81, "endColumn": 8, "problem": "LiteralAsPropertyName", - "autofix": [ - { - "replacementText": "__2", - "start": 1739, - "end": 1744, - "line": 81, - "column": 3, - "endLine": 81, - "endColumn": 8 - }, - { - "replacementText": "__2", - "start": 1824, - "end": 1829, - "line": 81, - "column": 3, - "endLine": 81, - "endColumn": 8 - } - ], "suggest": "", "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)", "severity": "ERROR" @@ -1169,17 +1042,6 @@ "endLine": 132, "endColumn": 15, "problem": "LiteralAsPropertyName", - "autofix": [ - { - "replacementText": "age", - "start": 2466, - "end": 2471, - "line": 132, - "column": 10, - "endLine": 132, - "endColumn": 15 - } - ], "suggest": "", "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)", "severity": "ERROR" diff --git a/ets2panda/linter/test/main/literals_as_prop_names.ets.migrate.ets b/ets2panda/linter/test/main/literals_as_prop_names.ets.migrate.ets index 6fb5cb3e0f5cb74294ebcbd803bacdd0840a12a4..2f91d28e5e7bb617fe864e45823b6ca7620258a0 100644 --- a/ets2panda/linter/test/main/literals_as_prop_names.ets.migrate.ets +++ b/ets2panda/linter/test/main/literals_as_prop_names.ets.migrate.ets @@ -29,18 +29,18 @@ enum LiteralAsPropertyNameEnum { class LiteralAsPropertyName { public one: string = "1111111111"; private __2: string; - Two: number; + 'Two': number; } const litAsPropName: LiteralAsPropertyName = { one: "1", __2: 'two', - Two: 2.0, + 'Two': 2.0, }; console.log(litAsPropName.one); console.log(litAsPropName.__2); -console.log(litAsPropName.Two); +console.log(litAsPropName["Two"]); class LiteralAsPropertyName_fix { public one: string = "1111111111"; @@ -82,12 +82,12 @@ console.log(x_fix._2); interface litAsPropNameIface { one: string; ___2: string; - __2: number; + '__2': number; } const int: litAsPropNameIface = { one: '12321', ___2: 'weqwewq', - __2: 123.0 + '__2': 123.0 }; const imp: ExportLitAsPropName = { 1: 234.0 }; @@ -138,7 +138,7 @@ let a:A = { age: 30.0} class B { - public age: number = 1.0 // error in arkts2 + public 'age': number = 1.0 // error in arkts2 } let obj11: Record = { diff --git a/ets2panda/linter/test/main/literals_as_prop_names.ets.migrate.json b/ets2panda/linter/test/main/literals_as_prop_names.ets.migrate.json index a180c185731eed0d9719daee26a9ec1c64f65992..7e186cd1a8275d3ad3f846b99424101b08f9f428 100644 --- a/ets2panda/linter/test/main/literals_as_prop_names.ets.migrate.json +++ b/ets2panda/linter/test/main/literals_as_prop_names.ets.migrate.json @@ -14,6 +14,36 @@ "limitations under the License." ], "result": [ + { + "line": 32, + "column": 3, + "endLine": 32, + "endColumn": 8, + "problem": "LiteralAsPropertyName", + "suggest": "", + "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)", + "severity": "ERROR" + }, + { + "line": 38, + "column": 3, + "endLine": 38, + "endColumn": 8, + "problem": "LiteralAsPropertyName", + "suggest": "", + "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)", + "severity": "ERROR" + }, + { + "line": 43, + "column": 13, + "endLine": 43, + "endColumn": 33, + "problem": "PropertyAccessByIndex", + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)", + "severity": "ERROR" + }, { "line": 62, "column": 9, @@ -64,6 +94,16 @@ "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)", "severity": "ERROR" }, + { + "line": 85, + "column": 3, + "endLine": 85, + "endColumn": 8, + "problem": "LiteralAsPropertyName", + "suggest": "", + "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)", + "severity": "ERROR" + }, { "line": 87, "column": 7, @@ -74,6 +114,16 @@ "rule": "This keyword cannot be used as identifiers (arkts-invalid-identifier)", "severity": "ERROR" }, + { + "line": 90, + "column": 3, + "endLine": 90, + "endColumn": 8, + "problem": "LiteralAsPropertyName", + "suggest": "", + "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)", + "severity": "ERROR" + }, { "line": 93, "column": 36, @@ -94,6 +144,16 @@ "rule": "Enum cannot get member name by member value (arkts-enum-no-props-by-index)", "severity": "ERROR" }, + { + "line": 141, + "column": 10, + "endLine": 141, + "endColumn": 15, + "problem": "LiteralAsPropertyName", + "suggest": "", + "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)", + "severity": "ERROR" + }, { "line": 144, "column": 37, @@ -194,16 +254,6 @@ "rule": "Property '__2' has no initializer and is not definitely assigned in the constructor.", "severity": "ERROR" }, - { - "line": 32, - "column": 3, - "endLine": 32, - "endColumn": 6, - "problem": "StrictDiagnostic", - "suggest": "Property 'Two' has no initializer and is not definitely assigned in the constructor.", - "rule": "Property 'Two' has no initializer and is not definitely assigned in the constructor.", - "severity": "ERROR" - }, { "line": 47, "column": 11, diff --git a/ets2panda/linter/test/main/numeric_semantics2.ets.autofix.json b/ets2panda/linter/test/main/numeric_semantics2.ets.autofix.json index 0cee44032a3206ca97c463973bf98fd30e6624fe..4d078bb82b53379efdb8b25c4ab8f04ce6eaa320 100644 --- a/ets2panda/linter/test/main/numeric_semantics2.ets.autofix.json +++ b/ets2panda/linter/test/main/numeric_semantics2.ets.autofix.json @@ -13,1317 +13,1266 @@ "See the License for the specific language governing permissions and", "limitations under the License." ], - "result": [ - { - "line": 22, - "column": 5, - "endLine": 22, - "endColumn": 26, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 17, - "column": 23, - "endLine": 17, - "endColumn": 25, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 678, - "end": 680, - "replacementText": "11.0", - "line": 17, - "column": 23, - "endLine": 17, - "endColumn": 25 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 18, - "column": 11, - "endLine": 18, - "endColumn": 17, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 702, - "end": 708, - "replacementText": "b: number = 12", - "line": 18, - "column": 11, - "endLine": 18, - "endColumn": 17 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 18, - "column": 15, - "endLine": 18, - "endColumn": 17, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 706, - "end": 708, - "replacementText": "12.0", - "line": 18, - "column": 15, - "endLine": 18, - "endColumn": 17 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 19, - "column": 11, - "endLine": 19, - "endColumn": 19, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 730, - "end": 738, - "replacementText": "c: number = 13.0", - "line": 19, - "column": 11, - "endLine": 19, - "endColumn": 19 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 21, - "column": 23, - "endLine": 21, - "endColumn": 25, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 800, - "end": 802, - "replacementText": "15.0", - "line": 21, - "column": 23, - "endLine": 21, - "endColumn": 25 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 22, - "column": 22, - "endLine": 22, - "endColumn": 23, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 835, - "end": 836, - "replacementText": "1.0", - "line": 22, - "column": 22, - "endLine": 22, - "endColumn": 23 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 22, - "column": 24, - "endLine": 22, - "endColumn": 25, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 837, - "end": 838, - "replacementText": "2.0", - "line": 22, - "column": 24, - "endLine": 22, - "endColumn": 25 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 31, - "column": 5, - "endLine": 31, - "endColumn": 30, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 38, - "column": 5, - "endLine": 38, - "endColumn": 23, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 45, - "column": 5, - "endLine": 45, - "endColumn": 25, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 35, - "column": 20, - "endLine": 35, - "endColumn": 26, - "problem": "LiteralAsPropertyName", - "autofix": [ - { - "replacementText": "name", - "start": 1117, - "end": 1123, - "line": 37, - "column": 18, - "endLine": 37, - "endColumn": 24 - }, - { - "replacementText": "name", - "start": 1210, - "end": 1216, - "line": 37, - "column": 18, - "endLine": 37, - "endColumn": 24 - } - ], - "suggest": "", - "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)", - "severity": "ERROR" - }, - { - "line": 35, - "column": 36, - "endLine": 35, - "endColumn": 37, - "problem": "LiteralAsPropertyName", - "autofix": [ - { - "replacementText": "__2", - "start": 1133, - "end": 1134, - "line": 38, - "column": 17, - "endLine": 38, - "endColumn": 21 - }, - { - "replacementText": "__2", - "start": 1224, - "end": 1225, - "line": 38, - "column": 17, - "endLine": 38, - "endColumn": 21 - }, - { - "replacementText": "x.__2", - "start": 1256, - "end": 1260, - "line": 38, - "column": 17, - "endLine": 38, - "endColumn": 21 - } - ], - "suggest": "", - "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)", - "severity": "ERROR" - }, - { - "line": 36, - "column": 20, - "endLine": 36, - "endColumn": 26, - "problem": "LiteralAsPropertyName", - "autofix": [ - { - "replacementText": "name", - "start": 1164, - "end": 1170, - "line": 36, - "column": 20, - "endLine": 36, - "endColumn": 26 - } - ], - "suggest": "", - "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)", - "severity": "ERROR" - }, - { - "line": 37, - "column": 18, - "endLine": 37, - "endColumn": 24, - "problem": "LiteralAsPropertyName", - "autofix": [ - { - "replacementText": "name", - "start": 1117, - "end": 1123, - "line": 37, - "column": 18, - "endLine": 37, - "endColumn": 24 - }, - { - "replacementText": "name", - "start": 1210, - "end": 1216, - "line": 37, - "column": 18, - "endLine": 37, - "endColumn": 24 - } - ], - "suggest": "", - "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)", - "severity": "ERROR" - }, - { - "line": 37, - "column": 32, - "endLine": 37, - "endColumn": 33, - "problem": "LiteralAsPropertyName", - "autofix": [ - { - "replacementText": "__2", - "start": 1133, - "end": 1134, - "line": 38, - "column": 17, - "endLine": 38, - "endColumn": 21 - }, - { - "replacementText": "__2", - "start": 1224, - "end": 1225, - "line": 38, - "column": 17, - "endLine": 38, - "endColumn": 21 - }, - { - "replacementText": "x.__2", - "start": 1256, - "end": 1260, - "line": 38, - "column": 17, - "endLine": 38, - "endColumn": 21 - } - ], - "suggest": "", - "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)", - "severity": "ERROR" - }, - { - "line": 38, - "column": 17, - "endLine": 38, - "endColumn": 21, - "problem": "PropertyAccessByIndex", - "autofix": [ - { - "replacementText": "__2", - "start": 1133, - "end": 1134, - "line": 38, - "column": 17, - "endLine": 38, - "endColumn": 21 - }, - { - "replacementText": "__2", - "start": 1224, - "end": 1225, - "line": 38, - "column": 17, - "endLine": 38, - "endColumn": 21 - }, - { - "replacementText": "x.__2", - "start": 1256, - "end": 1260, - "line": 38, - "column": 17, - "endLine": 38, - "endColumn": 21 - } - ], - "suggest": "", - "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)", - "severity": "ERROR" - }, - { - "line": 42, - "column": 17, - "endLine": 42, - "endColumn": 18, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)", - "severity": "ERROR" - }, - { - "line": 42, - "column": 30, - "endLine": 42, - "endColumn": 31, - "problem": "LiteralAsPropertyName", - "suggest": "", - "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)", - "severity": "ERROR" - }, - { - "line": 44, - "column": 17, - "endLine": 44, - "endColumn": 19, - "problem": "NosparseArray", - "suggest": "", - "rule": "Sparse array is not supported in ArkTS1.2 (arkts-no-sparse-array)", - "severity": "ERROR" - }, - { - "line": 45, - "column": 17, - "endLine": 45, - "endColumn": 23, - "problem": "RuntimeArrayCheck", - "suggest": "", - "rule": "Array bound not checked. (arkts-runtime-array-check)", - "severity": "ERROR" - }, - { - "line": 62, - "column": 13, - "endLine": 62, - "endColumn": 14, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 1792, - "end": 1793, - "replacementText": "1.0", - "line": 62, - "column": 13, - "endLine": 62, - "endColumn": 14 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 63, - "column": 13, - "endLine": 63, - "endColumn": 14, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 1808, - "end": 1809, - "replacementText": "2.0", - "line": 63, - "column": 13, - "endLine": 63, - "endColumn": 14 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 68, - "column": 28, - "endLine": 68, - "endColumn": 30, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 1885, - "end": 1887, - "replacementText": "11.0", - "line": 68, - "column": 28, - "endLine": 68, - "endColumn": 30 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 72, - "column": 5, - "endLine": 72, - "endColumn": 13, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 72, - "column": 8, - "endLine": 72, - "endColumn": 9, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 1925, - "end": 1926, - "replacementText": "1.0", - "line": 72, - "column": 8, - "endLine": 72, - "endColumn": 9 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 72, - "column": 10, - "endLine": 72, - "endColumn": 11, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 1927, - "end": 1928, - "replacementText": "2.0", - "line": 72, - "column": 10, - "endLine": 72, - "endColumn": 11 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 83, - "column": 5, - "endLine": 83, - "endColumn": 35, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 77, - "column": 19, - "endLine": 77, - "endColumn": 20, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 1990, - "end": 1991, - "replacementText": "1.0", - "line": 77, - "column": 19, - "endLine": 77, - "endColumn": 20 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 77, - "column": 21, - "endLine": 77, - "endColumn": 22, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 1992, - "end": 1993, - "replacementText": "2.0", - "line": 77, - "column": 21, - "endLine": 77, - "endColumn": 22 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 79, - "column": 21, - "endLine": 79, - "endColumn": 23, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 2056, - "end": 2058, - "replacementText": "20.0", - "line": 79, - "column": 21, - "endLine": 79, - "endColumn": 23 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 79, - "column": 26, - "endLine": 79, - "endColumn": 28, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 2061, - "end": 2063, - "replacementText": "21.0", - "line": 79, - "column": 26, - "endLine": 79, - "endColumn": 28 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 79, - "column": 31, - "endLine": 79, - "endColumn": 33, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 2066, - "end": 2068, - "replacementText": "22.0", - "line": 79, - "column": 31, - "endLine": 79, - "endColumn": 33 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 79, - "column": 36, - "endLine": 79, - "endColumn": 38, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 2071, - "end": 2073, - "replacementText": "23.0", - "line": 79, - "column": 36, - "endLine": 79, - "endColumn": 38 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 81, - "column": 24, - "endLine": 81, - "endColumn": 26, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 2159, - "end": 2161, - "replacementText": "20.0", - "line": 81, - "column": 24, - "endLine": 81, - "endColumn": 26 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 86, - "column": 9, - "endLine": 86, - "endColumn": 15, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 2321, - "end": 2327, - "replacementText": "e: number = 15", - "line": 86, - "column": 9, - "endLine": 86, - "endColumn": 15 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 86, - "column": 13, - "endLine": 86, - "endColumn": 15, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 2325, - "end": 2327, - "replacementText": "15.0", - "line": 86, - "column": 13, - "endLine": 86, - "endColumn": 15 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 87, - "column": 9, - "endLine": 87, - "endColumn": 19, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 2347, - "end": 2357, - "replacementText": "e1: number = e & 3", - "line": 87, - "column": 9, - "endLine": 87, - "endColumn": 19 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 87, - "column": 18, - "endLine": 87, - "endColumn": 19, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 2356, - "end": 2357, - "replacementText": "3.0", - "line": 87, - "column": 18, - "endLine": 87, - "endColumn": 19 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 88, - "column": 9, - "endLine": 88, - "endColumn": 19, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 2378, - "end": 2388, - "replacementText": "e2: number = e | 3", - "line": 88, - "column": 9, - "endLine": 88, - "endColumn": 19 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 88, - "column": 18, - "endLine": 88, - "endColumn": 19, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 2387, - "end": 2388, - "replacementText": "3.0", - "line": 88, - "column": 18, - "endLine": 88, - "endColumn": 19 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 100, - "column": 5, - "endLine": 100, - "endColumn": 27, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 101, - "column": 5, - "endLine": 101, - "endColumn": 38, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 102, - "column": 5, - "endLine": 102, - "endColumn": 25, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 114, - "column": 5, - "endLine": 114, - "endColumn": 15, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 115, - "column": 5, - "endLine": 115, - "endColumn": 17, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 120, - "column": 5, - "endLine": 120, - "endColumn": 27, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 121, - "column": 5, - "endLine": 121, - "endColumn": 28, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 123, - "column": 5, - "endLine": 123, - "endColumn": 38, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 124, - "column": 5, - "endLine": 124, - "endColumn": 53, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 125, - "column": 5, - "endLine": 125, - "endColumn": 57, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 100, - "column": 25, - "endLine": 100, - "endColumn": 26, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 2611, - "end": 2612, - "replacementText": "1.0", - "line": 100, - "column": 25, - "endLine": 100, - "endColumn": 26 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 101, - "column": 32, - "endLine": 101, - "endColumn": 33, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 2673, - "end": 2674, - "replacementText": "1.0", - "line": 101, - "column": 32, - "endLine": 101, - "endColumn": 33 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 101, - "column": 36, - "endLine": 101, - "endColumn": 37, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 2677, - "end": 2678, - "replacementText": "2.0", - "line": 101, - "column": 36, - "endLine": 101, - "endColumn": 37 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 102, - "column": 23, - "endLine": 102, - "endColumn": 24, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 2713, - "end": 2714, - "replacementText": "1.0", - "line": 102, - "column": 23, - "endLine": 102, - "endColumn": 24 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 109, - "column": 32, - "endLine": 109, - "endColumn": 60, - "problem": "GenericCallNoTypeArgs", - "suggest": "", - "rule": "Type inference in case of generic function calls is limited (arkts-no-inferred-generic-params)", - "severity": "ERROR" - }, - { - "line": 114, - "column": 9, - "endLine": 114, - "endColumn": 11, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 3105, - "end": 3107, - "replacementText": "12.0", - "line": 114, - "column": 9, - "endLine": 114, - "endColumn": 11 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 114, - "column": 13, - "endLine": 114, - "endColumn": 15, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 3109, - "end": 3111, - "replacementText": "24.0", - "line": 114, - "column": 13, - "endLine": 114, - "endColumn": 15 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 115, - "column": 15, - "endLine": 115, - "endColumn": 17, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 3137, - "end": 3139, - "replacementText": "24.0", - "line": 115, - "column": 15, - "endLine": 115, - "endColumn": 17 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 120, - "column": 16, - "endLine": 120, - "endColumn": 17, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 3250, - "end": 3251, - "replacementText": "8.0", - "line": 120, - "column": 16, - "endLine": 120, - "endColumn": 17 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 120, - "column": 25, - "endLine": 120, - "endColumn": 27, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 3259, - "end": 3261, - "replacementText": "24.0", - "line": 120, - "column": 25, - "endLine": 120, - "endColumn": 27 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 121, - "column": 16, - "endLine": 121, - "endColumn": 17, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 3288, - "end": 3289, - "replacementText": "8.0", - "line": 121, - "column": 16, - "endLine": 121, - "endColumn": 17 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 121, - "column": 26, - "endLine": 121, - "endColumn": 28, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 3298, - "end": 3300, - "replacementText": "24.0", - "line": 121, - "column": 26, - "endLine": 121, - "endColumn": 28 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 123, - "column": 22, - "endLine": 123, - "endColumn": 24, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 3335, - "end": 3337, - "replacementText": "12.0", - "line": 123, - "column": 22, - "endLine": 123, - "endColumn": 24 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 123, - "column": 25, - "endLine": 123, - "endColumn": 27, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 3338, - "end": 3340, - "replacementText": "24.0", - "line": 123, - "column": 25, - "endLine": 123, - "endColumn": 27 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 123, - "column": 29, - "endLine": 123, - "endColumn": 30, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 3342, - "end": 3343, - "replacementText": "8.0", - "line": 123, - "column": 29, - "endLine": 123, - "endColumn": 30 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 124, - "column": 37, - "endLine": 124, - "endColumn": 39, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 3399, - "end": 3401, - "replacementText": "12.0", - "line": 124, - "column": 37, - "endLine": 124, - "endColumn": 39 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 124, - "column": 40, - "endLine": 124, - "endColumn": 42, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 3402, - "end": 3404, - "replacementText": "24.0", - "line": 124, - "column": 40, - "endLine": 124, - "endColumn": 42 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 124, - "column": 44, - "endLine": 124, - "endColumn": 45, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 3406, - "end": 3407, - "replacementText": "8.0", - "line": 124, - "column": 44, - "endLine": 124, - "endColumn": 45 - } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - }, - { - "line": 125, - "column": 48, - "endLine": 125, - "endColumn": 49, - "problem": "NumericSemantics", - "autofix": [ - { - "start": 3474, - "end": 3475, - "replacementText": "8.0", - "line": 125, - "column": 48, - "endLine": 125, - "endColumn": 49 + "result": [ + { + "line": 22, + "column": 5, + "endLine": 22, + "endColumn": 26, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 17, + "column": 23, + "endLine": 17, + "endColumn": 25, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 678, + "end": 680, + "replacementText": "11.0", + "line": 17, + "column": 23, + "endLine": 17, + "endColumn": 25 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 18, + "column": 11, + "endLine": 18, + "endColumn": 17, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 702, + "end": 708, + "replacementText": "b: number = 12", + "line": 18, + "column": 11, + "endLine": 18, + "endColumn": 17 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 18, + "column": 15, + "endLine": 18, + "endColumn": 17, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 706, + "end": 708, + "replacementText": "12.0", + "line": 18, + "column": 15, + "endLine": 18, + "endColumn": 17 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 19, + "column": 11, + "endLine": 19, + "endColumn": 19, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 730, + "end": 738, + "replacementText": "c: number = 13.0", + "line": 19, + "column": 11, + "endLine": 19, + "endColumn": 19 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 21, + "column": 23, + "endLine": 21, + "endColumn": 25, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 800, + "end": 802, + "replacementText": "15.0", + "line": 21, + "column": 23, + "endLine": 21, + "endColumn": 25 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 22, + "column": 22, + "endLine": 22, + "endColumn": 23, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 835, + "end": 836, + "replacementText": "1.0", + "line": 22, + "column": 22, + "endLine": 22, + "endColumn": 23 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 22, + "column": 24, + "endLine": 22, + "endColumn": 25, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 837, + "end": 838, + "replacementText": "2.0", + "line": 22, + "column": 24, + "endLine": 22, + "endColumn": 25 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 31, + "column": 5, + "endLine": 31, + "endColumn": 30, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 38, + "column": 5, + "endLine": 38, + "endColumn": 23, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 45, + "column": 5, + "endLine": 45, + "endColumn": 25, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 35, + "column": 20, + "endLine": 35, + "endColumn": 26, + "problem": "LiteralAsPropertyName", + "suggest": "", + "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)", + "severity": "ERROR" + }, + { + "line": 35, + "column": 36, + "endLine": 35, + "endColumn": 37, + "problem": "LiteralAsPropertyName", + "autofix": [ + { + "replacementText": "__2", + "start": 1133, + "end": 1134, + "line": 38, + "column": 17, + "endLine": 38, + "endColumn": 21 + }, + { + "replacementText": "__2", + "start": 1224, + "end": 1225, + "line": 38, + "column": 17, + "endLine": 38, + "endColumn": 21 + }, + { + "replacementText": "x.__2", + "start": 1256, + "end": 1260, + "line": 38, + "column": 17, + "endLine": 38, + "endColumn": 21 + } + ], + "suggest": "", + "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)", + "severity": "ERROR" + }, + { + "line": 36, + "column": 20, + "endLine": 36, + "endColumn": 26, + "problem": "LiteralAsPropertyName", + "suggest": "", + "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)", + "severity": "ERROR" + }, + { + "line": 37, + "column": 18, + "endLine": 37, + "endColumn": 24, + "problem": "LiteralAsPropertyName", + "suggest": "", + "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)", + "severity": "ERROR" + }, + { + "line": 37, + "column": 32, + "endLine": 37, + "endColumn": 33, + "problem": "LiteralAsPropertyName", + "autofix": [ + { + "replacementText": "__2", + "start": 1133, + "end": 1134, + "line": 38, + "column": 17, + "endLine": 38, + "endColumn": 21 + }, + { + "replacementText": "__2", + "start": 1224, + "end": 1225, + "line": 38, + "column": 17, + "endLine": 38, + "endColumn": 21 + }, + { + "replacementText": "x.__2", + "start": 1256, + "end": 1260, + "line": 38, + "column": 17, + "endLine": 38, + "endColumn": 21 + } + ], + "suggest": "", + "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)", + "severity": "ERROR" + }, + { + "line": 38, + "column": 17, + "endLine": 38, + "endColumn": 21, + "problem": "PropertyAccessByIndex", + "autofix": [ + { + "replacementText": "__2", + "start": 1133, + "end": 1134, + "line": 38, + "column": 17, + "endLine": 38, + "endColumn": 21 + }, + { + "replacementText": "__2", + "start": 1224, + "end": 1225, + "line": 38, + "column": 17, + "endLine": 38, + "endColumn": 21 + }, + { + "replacementText": "x.__2", + "start": 1256, + "end": 1260, + "line": 38, + "column": 17, + "endLine": 38, + "endColumn": 21 + } + ], + "suggest": "", + "rule": "Indexed access is not supported for fields (arkts-no-props-by-index)", + "severity": "ERROR" + }, + { + "line": 42, + "column": 17, + "endLine": 42, + "endColumn": 18, + "problem": "ObjectLiteralNoContextType", + "suggest": "", + "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)", + "severity": "ERROR" + }, + { + "line": 42, + "column": 30, + "endLine": 42, + "endColumn": 31, + "problem": "LiteralAsPropertyName", + "suggest": "", + "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)", + "severity": "ERROR" + }, + { + "line": 44, + "column": 17, + "endLine": 44, + "endColumn": 19, + "problem": "NosparseArray", + "suggest": "", + "rule": "Sparse array is not supported in ArkTS1.2 (arkts-no-sparse-array)", + "severity": "ERROR" + }, + { + "line": 45, + "column": 17, + "endLine": 45, + "endColumn": 23, + "problem": "RuntimeArrayCheck", + "suggest": "", + "rule": "Array bound not checked. (arkts-runtime-array-check)", + "severity": "ERROR" + }, + { + "line": 62, + "column": 13, + "endLine": 62, + "endColumn": 14, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 1792, + "end": 1793, + "replacementText": "1.0", + "line": 62, + "column": 13, + "endLine": 62, + "endColumn": 14 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 63, + "column": 13, + "endLine": 63, + "endColumn": 14, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 1808, + "end": 1809, + "replacementText": "2.0", + "line": 63, + "column": 13, + "endLine": 63, + "endColumn": 14 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 68, + "column": 28, + "endLine": 68, + "endColumn": 30, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 1885, + "end": 1887, + "replacementText": "11.0", + "line": 68, + "column": 28, + "endLine": 68, + "endColumn": 30 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 72, + "column": 5, + "endLine": 72, + "endColumn": 13, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 72, + "column": 8, + "endLine": 72, + "endColumn": 9, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 1925, + "end": 1926, + "replacementText": "1.0", + "line": 72, + "column": 8, + "endLine": 72, + "endColumn": 9 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 72, + "column": 10, + "endLine": 72, + "endColumn": 11, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 1927, + "end": 1928, + "replacementText": "2.0", + "line": 72, + "column": 10, + "endLine": 72, + "endColumn": 11 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 83, + "column": 5, + "endLine": 83, + "endColumn": 35, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 77, + "column": 19, + "endLine": 77, + "endColumn": 20, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 1990, + "end": 1991, + "replacementText": "1.0", + "line": 77, + "column": 19, + "endLine": 77, + "endColumn": 20 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 77, + "column": 21, + "endLine": 77, + "endColumn": 22, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 1992, + "end": 1993, + "replacementText": "2.0", + "line": 77, + "column": 21, + "endLine": 77, + "endColumn": 22 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 79, + "column": 21, + "endLine": 79, + "endColumn": 23, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 2056, + "end": 2058, + "replacementText": "20.0", + "line": 79, + "column": 21, + "endLine": 79, + "endColumn": 23 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 79, + "column": 26, + "endLine": 79, + "endColumn": 28, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 2061, + "end": 2063, + "replacementText": "21.0", + "line": 79, + "column": 26, + "endLine": 79, + "endColumn": 28 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 79, + "column": 31, + "endLine": 79, + "endColumn": 33, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 2066, + "end": 2068, + "replacementText": "22.0", + "line": 79, + "column": 31, + "endLine": 79, + "endColumn": 33 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 79, + "column": 36, + "endLine": 79, + "endColumn": 38, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 2071, + "end": 2073, + "replacementText": "23.0", + "line": 79, + "column": 36, + "endLine": 79, + "endColumn": 38 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 81, + "column": 24, + "endLine": 81, + "endColumn": 26, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 2159, + "end": 2161, + "replacementText": "20.0", + "line": 81, + "column": 24, + "endLine": 81, + "endColumn": 26 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 86, + "column": 9, + "endLine": 86, + "endColumn": 15, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 2321, + "end": 2327, + "replacementText": "e: number = 15", + "line": 86, + "column": 9, + "endLine": 86, + "endColumn": 15 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 86, + "column": 13, + "endLine": 86, + "endColumn": 15, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 2325, + "end": 2327, + "replacementText": "15.0", + "line": 86, + "column": 13, + "endLine": 86, + "endColumn": 15 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 87, + "column": 9, + "endLine": 87, + "endColumn": 19, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 2347, + "end": 2357, + "replacementText": "e1: number = e & 3", + "line": 87, + "column": 9, + "endLine": 87, + "endColumn": 19 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 87, + "column": 18, + "endLine": 87, + "endColumn": 19, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 2356, + "end": 2357, + "replacementText": "3.0", + "line": 87, + "column": 18, + "endLine": 87, + "endColumn": 19 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 88, + "column": 9, + "endLine": 88, + "endColumn": 19, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 2378, + "end": 2388, + "replacementText": "e2: number = e | 3", + "line": 88, + "column": 9, + "endLine": 88, + "endColumn": 19 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 88, + "column": 18, + "endLine": 88, + "endColumn": 19, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 2387, + "end": 2388, + "replacementText": "3.0", + "line": 88, + "column": 18, + "endLine": 88, + "endColumn": 19 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 100, + "column": 5, + "endLine": 100, + "endColumn": 27, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 101, + "column": 5, + "endLine": 101, + "endColumn": 38, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 102, + "column": 5, + "endLine": 102, + "endColumn": 25, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 114, + "column": 5, + "endLine": 114, + "endColumn": 15, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 115, + "column": 5, + "endLine": 115, + "endColumn": 17, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 120, + "column": 5, + "endLine": 120, + "endColumn": 27, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 121, + "column": 5, + "endLine": 121, + "endColumn": 28, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 123, + "column": 5, + "endLine": 123, + "endColumn": 38, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 124, + "column": 5, + "endLine": 124, + "endColumn": 53, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 125, + "column": 5, + "endLine": 125, + "endColumn": 57, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 100, + "column": 25, + "endLine": 100, + "endColumn": 26, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 2611, + "end": 2612, + "replacementText": "1.0", + "line": 100, + "column": 25, + "endLine": 100, + "endColumn": 26 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 101, + "column": 32, + "endLine": 101, + "endColumn": 33, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 2673, + "end": 2674, + "replacementText": "1.0", + "line": 101, + "column": 32, + "endLine": 101, + "endColumn": 33 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 101, + "column": 36, + "endLine": 101, + "endColumn": 37, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 2677, + "end": 2678, + "replacementText": "2.0", + "line": 101, + "column": 36, + "endLine": 101, + "endColumn": 37 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 102, + "column": 23, + "endLine": 102, + "endColumn": 24, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 2713, + "end": 2714, + "replacementText": "1.0", + "line": 102, + "column": 23, + "endLine": 102, + "endColumn": 24 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 109, + "column": 32, + "endLine": 109, + "endColumn": 60, + "problem": "GenericCallNoTypeArgs", + "suggest": "", + "rule": "Type inference in case of generic function calls is limited (arkts-no-inferred-generic-params)", + "severity": "ERROR" + }, + { + "line": 114, + "column": 9, + "endLine": 114, + "endColumn": 11, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 3105, + "end": 3107, + "replacementText": "12.0", + "line": 114, + "column": 9, + "endLine": 114, + "endColumn": 11 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 114, + "column": 13, + "endLine": 114, + "endColumn": 15, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 3109, + "end": 3111, + "replacementText": "24.0", + "line": 114, + "column": 13, + "endLine": 114, + "endColumn": 15 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 115, + "column": 15, + "endLine": 115, + "endColumn": 17, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 3137, + "end": 3139, + "replacementText": "24.0", + "line": 115, + "column": 15, + "endLine": 115, + "endColumn": 17 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 120, + "column": 16, + "endLine": 120, + "endColumn": 17, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 3250, + "end": 3251, + "replacementText": "8.0", + "line": 120, + "column": 16, + "endLine": 120, + "endColumn": 17 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 120, + "column": 25, + "endLine": 120, + "endColumn": 27, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 3259, + "end": 3261, + "replacementText": "24.0", + "line": 120, + "column": 25, + "endLine": 120, + "endColumn": 27 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 121, + "column": 16, + "endLine": 121, + "endColumn": 17, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 3288, + "end": 3289, + "replacementText": "8.0", + "line": 121, + "column": 16, + "endLine": 121, + "endColumn": 17 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 121, + "column": 26, + "endLine": 121, + "endColumn": 28, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 3298, + "end": 3300, + "replacementText": "24.0", + "line": 121, + "column": 26, + "endLine": 121, + "endColumn": 28 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 123, + "column": 22, + "endLine": 123, + "endColumn": 24, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 3335, + "end": 3337, + "replacementText": "12.0", + "line": 123, + "column": 22, + "endLine": 123, + "endColumn": 24 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 123, + "column": 25, + "endLine": 123, + "endColumn": 27, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 3338, + "end": 3340, + "replacementText": "24.0", + "line": 123, + "column": 25, + "endLine": 123, + "endColumn": 27 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 123, + "column": 29, + "endLine": 123, + "endColumn": 30, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 3342, + "end": 3343, + "replacementText": "8.0", + "line": 123, + "column": 29, + "endLine": 123, + "endColumn": 30 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 124, + "column": 37, + "endLine": 124, + "endColumn": 39, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 3399, + "end": 3401, + "replacementText": "12.0", + "line": 124, + "column": 37, + "endLine": 124, + "endColumn": 39 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 124, + "column": 40, + "endLine": 124, + "endColumn": 42, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 3402, + "end": 3404, + "replacementText": "24.0", + "line": 124, + "column": 40, + "endLine": 124, + "endColumn": 42 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 124, + "column": 44, + "endLine": 124, + "endColumn": 45, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 3406, + "end": 3407, + "replacementText": "8.0", + "line": 124, + "column": 44, + "endLine": 124, + "endColumn": 45 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" + }, + { + "line": 125, + "column": 48, + "endLine": 125, + "endColumn": 49, + "problem": "NumericSemantics", + "autofix": [ + { + "start": 3474, + "end": 3475, + "replacementText": "8.0", + "line": 125, + "column": 48, + "endLine": 125, + "endColumn": 49 + } + ], + "suggest": "", + "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", + "severity": "ERROR" } - ], - "suggest": "", - "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", - "severity": "ERROR" - } - ] + ] } diff --git a/ets2panda/linter/test/main/numeric_semantics2.ets.migrate.ets b/ets2panda/linter/test/main/numeric_semantics2.ets.migrate.ets index 06a1c158599f2e576c0ba151127a01324bb1f7ce..f39bf7bb56108af7870fed0be8902a208ea3ac32 100644 --- a/ets2panda/linter/test/main/numeric_semantics2.ets.migrate.ets +++ b/ets2panda/linter/test/main/numeric_semantics2.ets.migrate.ets @@ -32,9 +32,9 @@ namespace NumericSemanticsDone { } namespace NoNumericSemantics { - interface X1 { name: number, __2: number} - interface X2 { name: number, _2: number} - let x: X1 = {name: 20.0, __2: 30.0} // OK + interface X1 { "name": number, __2: number} + interface X2 { "name": number, _2: number} + let x: X1 = {"name": 20.0, __2: 30.0} // OK console.log(x.__2); // OK let x_fix: X2 = {name: 20.0, _2: 20.0}; diff --git a/ets2panda/linter/test/main/numeric_semantics2.ets.migrate.json b/ets2panda/linter/test/main/numeric_semantics2.ets.migrate.json index 57a7300d81f95c785f998fb774898c73ede2b227..51e48f53b4d8dcdbf4e8e6aeed40b386983f2b85 100644 --- a/ets2panda/linter/test/main/numeric_semantics2.ets.migrate.json +++ b/ets2panda/linter/test/main/numeric_semantics2.ets.migrate.json @@ -13,216 +13,247 @@ "See the License for the specific language governing permissions and", "limitations under the License." ], - "result": [ - { - "line": 22, - "column": 5, - "endLine": 22, - "endColumn": 30, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 31, - "column": 5, - "endLine": 31, - "endColumn": 30, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 38, - "column": 5, - "endLine": 38, - "endColumn": 24, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 45, - "column": 5, - "endLine": 45, - "endColumn": 25, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 42, - "column": 17, - "endLine": 42, - "endColumn": 18, - "problem": "ObjectLiteralNoContextType", - "suggest": "", - "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)", - "severity": "ERROR" - }, - { - "line": 42, - "column": 30, - "endLine": 42, - "endColumn": 31, - "problem": "LiteralAsPropertyName", - "suggest": "", - "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)", - "severity": "ERROR" - }, - { - "line": 44, - "column": 17, - "endLine": 44, - "endColumn": 19, - "problem": "NosparseArray", - "suggest": "", - "rule": "Sparse array is not supported in ArkTS1.2 (arkts-no-sparse-array)", - "severity": "ERROR" - }, - { - "line": 45, - "column": 17, - "endLine": 45, - "endColumn": 23, - "problem": "RuntimeArrayCheck", - "suggest": "", - "rule": "Array bound not checked. (arkts-runtime-array-check)", - "severity": "ERROR" - }, - { - "line": 72, - "column": 5, - "endLine": 72, - "endColumn": 17, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 83, - "column": 5, - "endLine": 83, - "endColumn": 35, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 100, - "column": 5, - "endLine": 100, - "endColumn": 29, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 101, - "column": 5, - "endLine": 101, - "endColumn": 42, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 102, - "column": 5, - "endLine": 102, - "endColumn": 27, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 114, - "column": 5, - "endLine": 114, - "endColumn": 19, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 115, - "column": 5, - "endLine": 115, - "endColumn": 19, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 120, - "column": 5, - "endLine": 120, - "endColumn": 31, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 121, - "column": 5, - "endLine": 121, - "endColumn": 32, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 123, - "column": 5, - "endLine": 123, - "endColumn": 44, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 124, - "column": 5, - "endLine": 124, - "endColumn": 59, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 125, - "column": 5, - "endLine": 125, - "endColumn": 59, - "problem": "NonDeclarationInNamespace", - "suggest": "", - "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", - "severity": "ERROR" - }, - { - "line": 109, - "column": 32, - "endLine": 109, - "endColumn": 60, - "problem": "GenericCallNoTypeArgs", - "suggest": "", - "rule": "Type inference in case of generic function calls is limited (arkts-no-inferred-generic-params)", - "severity": "ERROR" - } - ] + + "result": [ + { + "line": 22, + "column": 5, + "endLine": 22, + "endColumn": 30, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 31, + "column": 5, + "endLine": 31, + "endColumn": 30, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 38, + "column": 5, + "endLine": 38, + "endColumn": 24, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 45, + "column": 5, + "endLine": 45, + "endColumn": 25, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 35, + "column": 20, + "endLine": 35, + "endColumn": 26, + "problem": "LiteralAsPropertyName", + "suggest": "", + "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)", + "severity": "ERROR" + }, + { + "line": 36, + "column": 20, + "endLine": 36, + "endColumn": 26, + "problem": "LiteralAsPropertyName", + "suggest": "", + "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)", + "severity": "ERROR" + }, + { + "line": 37, + "column": 18, + "endLine": 37, + "endColumn": 24, + "problem": "LiteralAsPropertyName", + "suggest": "", + "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)", + "severity": "ERROR" + }, + { + "line": 42, + "column": 17, + "endLine": 42, + "endColumn": 18, + "problem": "ObjectLiteralNoContextType", + "suggest": "", + "rule": "Object literal must correspond to some explicitly declared class or interface (arkts-no-untyped-obj-literals)", + "severity": "ERROR" + }, + { + "line": 42, + "column": 30, + "endLine": 42, + "endColumn": 31, + "problem": "LiteralAsPropertyName", + "suggest": "", + "rule": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)", + "severity": "ERROR" + }, + { + "line": 44, + "column": 17, + "endLine": 44, + "endColumn": 19, + "problem": "NosparseArray", + "suggest": "", + "rule": "Sparse array is not supported in ArkTS1.2 (arkts-no-sparse-array)", + "severity": "ERROR" + }, + { + "line": 45, + "column": 17, + "endLine": 45, + "endColumn": 23, + "problem": "RuntimeArrayCheck", + "suggest": "", + "rule": "Array bound not checked. (arkts-runtime-array-check)", + "severity": "ERROR" + }, + { + "line": 72, + "column": 5, + "endLine": 72, + "endColumn": 17, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 83, + "column": 5, + "endLine": 83, + "endColumn": 35, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 100, + "column": 5, + "endLine": 100, + "endColumn": 29, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 101, + "column": 5, + "endLine": 101, + "endColumn": 42, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 102, + "column": 5, + "endLine": 102, + "endColumn": 27, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 114, + "column": 5, + "endLine": 114, + "endColumn": 19, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 115, + "column": 5, + "endLine": 115, + "endColumn": 19, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 120, + "column": 5, + "endLine": 120, + "endColumn": 31, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 121, + "column": 5, + "endLine": 121, + "endColumn": 32, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 123, + "column": 5, + "endLine": 123, + "endColumn": 44, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 124, + "column": 5, + "endLine": 124, + "endColumn": 59, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 125, + "column": 5, + "endLine": 125, + "endColumn": 59, + "problem": "NonDeclarationInNamespace", + "suggest": "", + "rule": "Non-declaration statements in namespaces are not supported (single semicolons are considered as empty non-declaration statements) (arkts-no-ns-statements)", + "severity": "ERROR" + }, + { + "line": 109, + "column": 32, + "endLine": 109, + "endColumn": 60, + "problem": "GenericCallNoTypeArgs", + "suggest": "", + "rule": "Type inference in case of generic function calls is limited (arkts-no-inferred-generic-params)", + "severity": "ERROR" + } + ] }