diff --git a/ets2panda/linter/package.json b/ets2panda/linter/package.json index 73dd2a41801b56968d0cb0ccc2a58ec9b46110bb..9c02abca4546da39b55045be4245ee1f063e3d13 100644 --- a/ets2panda/linter/package.json +++ b/ets2panda/linter/package.json @@ -24,6 +24,7 @@ "test_main": "npm run testrunner -- -d test/main", "test_ohmurl": "npm run testrunner -- -d test/ohmurl", "test_interop": "npm run testrunner -- -d test/interop", + "test_sdk": "npm run testrunner -- -d test/sdkwhite", "test_concurrent": "npm run testrunner -- -d test/concurrent", "test_rules": "npm run testrunner -- -d test/rules", "test_regression": "npm run testrunner -- -d test/regression", diff --git a/ets2panda/linter/src/cli/LinterCLI.ts b/ets2panda/linter/src/cli/LinterCLI.ts index a05def96551ad4a5ce6974b00746c288e75f1de5..45bd9fddcd788362a353d59c33e646bac8156c4e 100644 --- a/ets2panda/linter/src/cli/LinterCLI.ts +++ b/ets2panda/linter/src/cli/LinterCLI.ts @@ -89,7 +89,12 @@ async function runIdeInteractiveMode(cmdOptions: CommandLineOptions): Promise, cmdOptions: CommandLineOptions): void { +function mergeLintProblems( + filePath: string, + problems: ProblemInfo[], + mergedProblems: Map, + cmdOptions: CommandLineOptions +): void { if (!mergedProblems.has(filePath)) { mergedProblems.set(filePath, []); } diff --git a/ets2panda/linter/src/lib/HomeCheck.ts b/ets2panda/linter/src/lib/HomeCheck.ts index e7bbae43eb15d0fd6ce719c25af20431c534c771..abf128b57f1fe8b3dbe44e45c24c46868ad456cf 100644 --- a/ets2panda/linter/src/lib/HomeCheck.ts +++ b/ets2panda/linter/src/lib/HomeCheck.ts @@ -56,7 +56,7 @@ export function getHomeCheckConfigInfo(cmdOptions: CommandLineOptions): { languageTags: languageTags, fileOrFolderToCheck: inputFiles, logLevel: cmdOptions.verbose ? 'DEBUG' : 'INFO', - arkAnalyzerLogLevel: cmdOptions.verbose ? 'DEBUG' : 'ERROR', + arkAnalyzerLogLevel: cmdOptions.verbose ? 'DEBUG' : 'ERROR' }; return { ruleConfigInfo, projectConfigInfo }; } diff --git a/ets2panda/linter/src/lib/LinterRunner.ts b/ets2panda/linter/src/lib/LinterRunner.ts index 457dd86a6c63794f02cd1b59a68bf69c7b9d46c3..04fc4174f4645cbc2b78ca289d286cebc7dfa497 100644 --- a/ets2panda/linter/src/lib/LinterRunner.ts +++ b/ets2panda/linter/src/lib/LinterRunner.ts @@ -216,7 +216,12 @@ function fix( } const qe: qEd.QuasiEditor = new qEd.QuasiEditor( - fileName, srcFile.text, linterConfig.cmdOptions.linterOptions, undefined, linterConfig.cmdOptions.outputFilePath); + fileName, + srcFile.text, + linterConfig.cmdOptions.linterOptions, + undefined, + linterConfig.cmdOptions.outputFilePath + ); updatedSourceTexts.set(fileName, qe.fix(problemInfos)); appliedFix = true; }); diff --git a/ets2panda/linter/src/lib/TypeScriptLinter.ts b/ets2panda/linter/src/lib/TypeScriptLinter.ts index c6c80448bc57d1644e616a5dbe8952548e49052e..1f8d345e4f362ffdcad700c6fc78695311c83c47 100644 --- a/ets2panda/linter/src/lib/TypeScriptLinter.ts +++ b/ets2panda/linter/src/lib/TypeScriptLinter.ts @@ -81,7 +81,7 @@ import { DEFAULT_DECORATOR_WHITE_LIST } from './utils/consts/DefaultDecoratorWhi import { INVALID_IDENTIFIER_KEYWORDS } from './utils/consts/InValidIndentifierKeywords'; import { WORKER_MODULES, WORKER_TEXT } from './utils/consts/WorkerAPI'; import { COLLECTIONS_TEXT, COLLECTIONS_MODULES } from './utils/consts/CollectionsAPI'; -import { ASON_TEXT, ASON_MODULES, JSON_TEXT } from './utils/consts/ArkTSUtilsAPI'; +import { ASON_TEXT, ASON_MODULES, ARKTS_UTILS_TEXT } from './utils/consts/ArkTSUtilsAPI'; import { interanlFunction } from './utils/consts/InternalFunction'; import { ETS_PART, PATH_SEPARATOR } from './utils/consts/OhmUrl'; import { @@ -3723,6 +3723,7 @@ export class TypeScriptLinter extends BaseTypeScriptLinter { return; } this.handleInterfaceImport(node); + this.checkAsonSymbol(node); const tsIdentifier = node; this.handleTsInterop(tsIdentifier, () => { const parent = tsIdentifier.parent; @@ -3762,7 +3763,6 @@ export class TypeScriptLinter extends BaseTypeScriptLinter { if (isArkTs2) { this.checkWorkerSymbol(tsIdentSym, node); this.checkCollectionsSymbol(tsIdentSym, node); - this.checkAsonSymbol(tsIdentSym, node); } } @@ -5020,7 +5020,7 @@ export class TypeScriptLinter extends BaseTypeScriptLinter { const type = this.tsTypeChecker.getTypeAtLocation(calleeExpr); if (type.isClassOrInterface()) { - this.incrementCounters(calleeExpr, FaultID.ConstructorIface); + this.incrementCounters(calleeExpr, FaultID.ConstructorIfaceFromSdk); } } @@ -6695,19 +6695,65 @@ export class TypeScriptLinter extends BaseTypeScriptLinter { } } - private checkAsonSymbol(symbol: ts.Symbol, node: ts.Node): void { - const cb = (): void => { - let autofix: Autofix[] | undefined; - const parent = node.parent; - autofix = this.autofixer?.replaceNode(parent ? parent : node, JSON_TEXT); + private checkAsonSymbol(node: ts.Identifier): void { + if (!this.options.arkts2) { + return; + } - if (ts.isImportSpecifier(parent) && ts.isIdentifier(node)) { - autofix = this.autofixer?.removeImport(node, parent); - } + if (node.text !== ASON_TEXT) { + return; + } - this.incrementCounters(node, FaultID.LimitedStdLibNoASON, autofix); - }; - this.checkSymbolAndExecute(symbol, ASON_TEXT, ASON_MODULES, cb); + const parent = node.parent; + switch (parent.kind) { + case ts.SyntaxKind.QualifiedName: + if (!ts.isQualifiedName(parent)) { + return; + } + if (parent.right.text !== node.text) { + return; + } + this.checkAsonUsage(parent.left); + + break; + case ts.SyntaxKind.PropertyAccessExpression: + if (!ts.isPropertyAccessExpression(parent)) { + return; + } + if (parent.name.text !== node.text) { + return; + } + this.checkAsonUsage(parent.expression); + + break; + default: + } + } + + private checkAsonUsage(nodeToCheck: ts.Node): void { + if (!ts.isIdentifier(nodeToCheck)) { + return; + } + const declaration = this.tsUtils.getDeclarationNode(nodeToCheck); + if (!declaration && nodeToCheck.text === ARKTS_UTILS_TEXT) { + this.incrementCounters(nodeToCheck, FaultID.LimitedStdLibNoASON); + return; + } + + if (!declaration) { + return; + } + + const sourceFile = declaration.getSourceFile(); + const fileName = path.basename(sourceFile.fileName); + + if ( + ASON_MODULES.some((moduleName) => { + return fileName.startsWith(moduleName); + }) + ) { + this.incrementCounters(nodeToCheck, FaultID.LimitedStdLibNoASON); + } } private checkCollectionsSymbol(symbol: ts.Symbol, node: ts.Node): void { @@ -6833,10 +6879,10 @@ export class TypeScriptLinter extends BaseTypeScriptLinter { private isDeclarationInSameFile(node: ts.Node): boolean { const symbol = this.tsTypeChecker.getSymbolAtLocation(node); - const decl = TsUtils.getDeclaration(symbol); - if (decl?.getSourceFile() === node.getSourceFile()) { - return true; - } + const decl = TsUtils.getDeclaration(symbol); + if (decl?.getSourceFile() === node.getSourceFile()) { + return true; + } return false; } diff --git a/ets2panda/linter/src/lib/utils/consts/ArkTS2Rules.ts b/ets2panda/linter/src/lib/utils/consts/ArkTS2Rules.ts index 3bf672666f69e6194b9f095372f1e707db3d859b..d659854b5f2c0186fc4947006d4a80f1b97c75c7 100644 --- a/ets2panda/linter/src/lib/utils/consts/ArkTS2Rules.ts +++ b/ets2panda/linter/src/lib/utils/consts/ArkTS2Rules.ts @@ -14,12 +14,139 @@ */ export const arkts2Rules: number[] = [ - 1, 25, 30, 34, 37, 29, 111, 137, 139, 140, 144, 149, 183, 184, 189, 190, 191, 192, 193, 198, 199, 202, 203, 206, 207, - 208, 209, 210, 211, 212, 213, 214, 215, 222, 232, 233, 234, 235, 236, 237, 238, 239, 251, 252, 253, 254, 255, 256, - 257, 258, 259, 260, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 281, 282, 283, 284, 285, - 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, - 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, - 346, 347, 348, 349, 350, 351, 355, 356, 357, 358, 359, 370, 371, 372, 373, 374, 375, 376, 377, 378 + 1, + 25, + 30, + 34, + 37, + 29, + 111, + 137, + 139, + 140, + 144, + 149, + 183, + 184, + 189, + 190, + 191, + 192, + 193, + 198, + 199, + 202, + 203, + 206, + 207, + 208, + 209, + 210, + 211, + 212, + 213, + 214, + 215, + 222, + 232, + 233, + 234, + 235, + 236, + 237, + 238, + 239, + 251, + 252, + 253, + 254, + 255, + 256, + 257, + 258, + 259, + 260, + 261, + 262, + 263, + 264, + 265, + 266, + 267, + 268, + 269, + 270, + 271, + 272, + 273, + 274, + 275, + 300, + 301, + 302, + 303, + 304, + 305, + 306, + 307, + 308, + 309, + 310, + 311, + 312, + 313, + 314, + 315, + 316, + 317, + 318, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 326, + 327, + 328, + 329, + 330, + 331, + 332, + 333, + 334, + 335, + 336, + 337, + 338, + 339, + 340, + 341, + 342, + 343, + 344, + 345, + 346, + 347, + 348, + 349, + 350, + 351, + 355, + 356, + 357, + 358, + 359, + 370, + 371, + 372, + 373, + 374, + 375, + 376, + 377, + 378 ]; export const onlyArkts2SyntaxRules: Map = new Map([ diff --git a/ets2panda/linter/src/lib/utils/consts/ArkTSUtilsAPI.ts b/ets2panda/linter/src/lib/utils/consts/ArkTSUtilsAPI.ts index dcddab08b580a515ee4cbb998d5b2bff7a1025a9..8218ffc5113110bf9692d2a2f8ec847471e0dc93 100644 --- a/ets2panda/linter/src/lib/utils/consts/ArkTSUtilsAPI.ts +++ b/ets2panda/linter/src/lib/utils/consts/ArkTSUtilsAPI.ts @@ -16,3 +16,4 @@ export const ASON_TEXT = 'ASON'; export const ASON_MODULES = ['@arkts.utils', '@kit.ArkTS']; export const JSON_TEXT = 'JSON'; +export const ARKTS_UTILS_TEXT = 'ArkTSUtils'; diff --git a/ets2panda/linter/test/main/arktsutils_module.ets b/ets2panda/linter/test/main/arktsutils_module.ets index 3bfeec6005331e400a16972a240767cc9f567293..4e81dea82b9caa9f42f8000a32557894ad38463d 100644 --- a/ets2panda/linter/test/main/arktsutils_module.ets +++ b/ets2panda/linter/test/main/arktsutils_module.ets @@ -12,7 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - import { utils } from './oh_modules/@arkts.utils'; import { utils as ArkTSUtilsAlias } from './oh_modules/@arkts.utils'; @@ -32,4 +31,8 @@ function tesCollectionsUsage() { const utils3 = kitArkTSUtils.ASON.stringify(1); const utils4: string = ArkTSUtilsAlias.ASON.stringify(1); -} \ No newline at end of file + + type CreatedType = ArkTSUtils.ASON.SomeType; + + const someType: CreatedType = ArkTSUtils.ASON.SomeType; +} diff --git a/ets2panda/linter/test/main/arktsutils_module.ets.arkts2.json b/ets2panda/linter/test/main/arktsutils_module.ets.arkts2.json index a090d23f5e12cfc98c611c61defab3c6495f7f74..6da6e6ae1588b4a7791270d2b02b227b7b9cf6eb 100644 --- a/ets2panda/linter/test/main/arktsutils_module.ets.arkts2.json +++ b/ets2panda/linter/test/main/arktsutils_module.ets.arkts2.json @@ -15,19 +15,19 @@ ], "result": [ { - "line": 28, - "column": 32, - "endLine": 28, - "endColumn": 36, + "line": 27, + "column": 26, + "endLine": 27, + "endColumn": 31, "problem": "LimitedStdLibNoASON", "suggest": "", "rule": "ASON is not supported. (arkts-no-need-stdlib-ason)", "severity": "ERROR" }, { - "line": 28, + "line": 27, "column": 47, - "endLine": 28, + "endLine": 27, "endColumn": 48, "problem": "NumericSemantics", "suggest": "", @@ -35,19 +35,19 @@ "severity": "ERROR" }, { - "line": 30, - "column": 34, - "endLine": 30, - "endColumn": 38, + "line": 29, + "column": 18, + "endLine": 29, + "endColumn": 33, "problem": "LimitedStdLibNoASON", "suggest": "", "rule": "ASON is not supported. (arkts-no-need-stdlib-ason)", "severity": "ERROR" }, { - "line": 30, + "line": 29, "column": 49, - "endLine": 30, + "endLine": 29, "endColumn": 50, "problem": "NumericSemantics", "suggest": "", @@ -55,19 +55,19 @@ "severity": "ERROR" }, { - "line": 32, - "column": 32, - "endLine": 32, - "endColumn": 36, + "line": 31, + "column": 18, + "endLine": 31, + "endColumn": 31, "problem": "LimitedStdLibNoASON", "suggest": "", "rule": "ASON is not supported. (arkts-no-need-stdlib-ason)", "severity": "ERROR" }, { - "line": 32, + "line": 31, "column": 47, - "endLine": 32, + "endLine": 31, "endColumn": 48, "problem": "NumericSemantics", "suggest": "", @@ -75,24 +75,44 @@ "severity": "ERROR" }, { - "line": 34, - "column": 42, - "endLine": 34, - "endColumn": 46, + "line": 33, + "column": 26, + "endLine": 33, + "endColumn": 41, "problem": "LimitedStdLibNoASON", "suggest": "", "rule": "ASON is not supported. (arkts-no-need-stdlib-ason)", "severity": "ERROR" }, { - "line": 34, + "line": 33, "column": 57, - "endLine": 34, + "endLine": 33, "endColumn": 58, "problem": "NumericSemantics", "suggest": "", "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", "severity": "ERROR" + }, + { + "line": 35, + "column": 22, + "endLine": 35, + "endColumn": 32, + "problem": "LimitedStdLibNoASON", + "suggest": "", + "rule": "ASON is not supported. (arkts-no-need-stdlib-ason)", + "severity": "ERROR" + }, + { + "line": 37, + "column": 33, + "endLine": 37, + "endColumn": 43, + "problem": "LimitedStdLibNoASON", + "suggest": "", + "rule": "ASON is not supported. (arkts-no-need-stdlib-ason)", + "severity": "ERROR" } ] -} \ No newline at end of file +} diff --git a/ets2panda/linter/test/main/arktsutils_module.ets.autofix.json b/ets2panda/linter/test/main/arktsutils_module.ets.autofix.json index 77b0d7cec92bf2d147a1e34daeb265c53c1d0f0d..d6868a9cbf4f513be46a17011c04913690564267 100644 --- a/ets2panda/linter/test/main/arktsutils_module.ets.autofix.json +++ b/ets2panda/linter/test/main/arktsutils_module.ets.autofix.json @@ -15,40 +15,29 @@ ], "result": [ { - "line": 28, - "column": 32, - "endLine": 28, - "endColumn": 36, + "line": 27, + "column": 26, + "endLine": 27, + "endColumn": 31, "problem": "LimitedStdLibNoASON", - "autofix": [ - { - "start": 981, - "end": 991, - "replacementText": "JSON", - "line": 28, - "column": 32, - "endLine": 28, - "endColumn": 36 - } - ], "suggest": "", "rule": "ASON is not supported. (arkts-no-need-stdlib-ason)", "severity": "ERROR" }, { - "line": 28, + "line": 27, "column": 47, - "endLine": 28, + "endLine": 27, "endColumn": 48, "problem": "NumericSemantics", "autofix": [ { - "start": 1002, - "end": 1003, + "start": 1001, + "end": 1002, "replacementText": "1.0", - "line": 28, + "line": 27, "column": 47, - "endLine": 28, + "endLine": 27, "endColumn": 48 } ], @@ -57,40 +46,29 @@ "severity": "ERROR" }, { - "line": 30, - "column": 34, - "endLine": 30, - "endColumn": 38, + "line": 29, + "column": 18, + "endLine": 29, + "endColumn": 33, "problem": "LimitedStdLibNoASON", - "autofix": [ - { - "start": 1024, - "end": 1044, - "replacementText": "JSON", - "line": 30, - "column": 34, - "endLine": 30, - "endColumn": 38 - } - ], "suggest": "", "rule": "ASON is not supported. (arkts-no-need-stdlib-ason)", "severity": "ERROR" }, { - "line": 30, + "line": 29, "column": 49, - "endLine": 30, + "endLine": 29, "endColumn": 50, "problem": "NumericSemantics", "autofix": [ { - "start": 1055, - "end": 1056, + "start": 1054, + "end": 1055, "replacementText": "1.0", - "line": 30, + "line": 29, "column": 49, - "endLine": 30, + "endLine": 29, "endColumn": 50 } ], @@ -99,40 +77,29 @@ "severity": "ERROR" }, { - "line": 32, - "column": 32, - "endLine": 32, - "endColumn": 36, + "line": 31, + "column": 18, + "endLine": 31, + "endColumn": 31, "problem": "LimitedStdLibNoASON", - "autofix": [ - { - "start": 1077, - "end": 1095, - "replacementText": "JSON", - "line": 32, - "column": 32, - "endLine": 32, - "endColumn": 36 - } - ], "suggest": "", "rule": "ASON is not supported. (arkts-no-need-stdlib-ason)", "severity": "ERROR" }, { - "line": 32, + "line": 31, "column": 47, - "endLine": 32, + "endLine": 31, "endColumn": 48, "problem": "NumericSemantics", "autofix": [ { - "start": 1106, - "end": 1107, + "start": 1105, + "end": 1106, "replacementText": "1.0", - "line": 32, + "line": 31, "column": 47, - "endLine": 32, + "endLine": 31, "endColumn": 48 } ], @@ -141,46 +108,55 @@ "severity": "ERROR" }, { - "line": 34, - "column": 42, - "endLine": 34, - "endColumn": 46, + "line": 33, + "column": 26, + "endLine": 33, + "endColumn": 41, "problem": "LimitedStdLibNoASON", - "autofix": [ - { - "start": 1136, - "end": 1156, - "replacementText": "JSON", - "line": 34, - "column": 42, - "endLine": 34, - "endColumn": 46 - } - ], "suggest": "", "rule": "ASON is not supported. (arkts-no-need-stdlib-ason)", "severity": "ERROR" }, { - "line": 34, + "line": 33, "column": 57, - "endLine": 34, + "endLine": 33, "endColumn": 58, "problem": "NumericSemantics", "autofix": [ { - "start": 1167, - "end": 1168, + "start": 1166, + "end": 1167, "replacementText": "1.0", - "line": 34, + "line": 33, "column": 57, - "endLine": 34, + "endLine": 33, "endColumn": 58 } ], "suggest": "", "rule": "Numeric semantics is different for integer values (arkts-numeric-semantic)", "severity": "ERROR" + }, + { + "line": 35, + "column": 22, + "endLine": 35, + "endColumn": 32, + "problem": "LimitedStdLibNoASON", + "suggest": "", + "rule": "ASON is not supported. (arkts-no-need-stdlib-ason)", + "severity": "ERROR" + }, + { + "line": 37, + "column": 33, + "endLine": 37, + "endColumn": 43, + "problem": "LimitedStdLibNoASON", + "suggest": "", + "rule": "ASON is not supported. (arkts-no-need-stdlib-ason)", + "severity": "ERROR" } ] -} \ No newline at end of file +} diff --git a/ets2panda/linter/test/main/arktsutils_module.ets.migrate.ets b/ets2panda/linter/test/main/arktsutils_module.ets.migrate.ets index b2a00452ad60169918db38c4092f2036bce562ba..3b1d7e17b6e5f116f3051c61fe671e0dee13327e 100644 --- a/ets2panda/linter/test/main/arktsutils_module.ets.migrate.ets +++ b/ets2panda/linter/test/main/arktsutils_module.ets.migrate.ets @@ -12,7 +12,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - import { utils } from './oh_modules/@arkts.utils'; import { utils as ArkTSUtilsAlias } from './oh_modules/@arkts.utils'; @@ -25,11 +24,15 @@ export { utils } from './oh_modules/@arkts.utils'; function tesCollectionsUsage() { - const utils1: string = JSON.stringify(1.0); + const utils1: string = utils.ASON.stringify(1.0); + + const utils2 = ArkTSUtilsAlias.ASON.stringify(1.0); + + const utils3 = kitArkTSUtils.ASON.stringify(1.0); - const utils2 = JSON.stringify(1.0); + const utils4: string = ArkTSUtilsAlias.ASON.stringify(1.0); - const utils3 = JSON.stringify(1.0); + type CreatedType = ArkTSUtils.ASON.SomeType; - const utils4: string = JSON.stringify(1.0); -} \ No newline at end of file + const someType: CreatedType = ArkTSUtils.ASON.SomeType; +} diff --git a/ets2panda/linter/test/main/arktsutils_module.ets.migrate.json b/ets2panda/linter/test/main/arktsutils_module.ets.migrate.json index 9f305c86d7ff705098b1e480818e125d5e6e3a4a..1b597eff5b8579d13d203bafc99002f5f4b2ce85 100644 --- a/ets2panda/linter/test/main/arktsutils_module.ets.migrate.json +++ b/ets2panda/linter/test/main/arktsutils_module.ets.migrate.json @@ -13,5 +13,66 @@ "See the License for the specific language governing permissions and", "limitations under the License." ], - "result": [] + "result": [ + { + "line": 27, + "column": 26, + "endLine": 27, + "endColumn": 31, + "problem": "LimitedStdLibNoASON", + "suggest": "", + "rule": "ASON is not supported. (arkts-no-need-stdlib-ason)", + "severity": "ERROR" + }, + { + "line": 29, + "column": 18, + "endLine": 29, + "endColumn": 33, + "problem": "LimitedStdLibNoASON", + "suggest": "", + "rule": "ASON is not supported. (arkts-no-need-stdlib-ason)", + "severity": "ERROR" + }, + { + "line": 31, + "column": 18, + "endLine": 31, + "endColumn": 31, + "problem": "LimitedStdLibNoASON", + "suggest": "", + "rule": "ASON is not supported. (arkts-no-need-stdlib-ason)", + "severity": "ERROR" + }, + { + "line": 33, + "column": 26, + "endLine": 33, + "endColumn": 41, + "problem": "LimitedStdLibNoASON", + "suggest": "", + "rule": "ASON is not supported. (arkts-no-need-stdlib-ason)", + "severity": "ERROR" + }, + { + "line": 35, + "column": 22, + "endLine": 35, + "endColumn": 32, + "problem": "LimitedStdLibNoASON", + "suggest": "", + "rule": "ASON is not supported. (arkts-no-need-stdlib-ason)", + "severity": "ERROR" + }, + { + "line": 37, + "column": 33, + "endLine": 37, + "endColumn": 43, + "problem": "LimitedStdLibNoASON", + "suggest": "", + "rule": "ASON is not supported. (arkts-no-need-stdlib-ason)", + "severity": "ERROR" + } + ] } diff --git a/ets2panda/linter/test/sdkwhite/return_new_interface.ets.arkts2.json b/ets2panda/linter/test/sdkwhite/return_new_interface.ets.arkts2.json index 92f597960e2eead0bfad0cdde65d9981dff2b182..7b974d3450d22c88c7a7dedab6df6e5722470b8d 100644 --- a/ets2panda/linter/test/sdkwhite/return_new_interface.ets.arkts2.json +++ b/ets2panda/linter/test/sdkwhite/return_new_interface.ets.arkts2.json @@ -49,9 +49,9 @@ "column": 14, "endLine": 26, "endColumn": 15, - "problem": "ConstructorIface", + "problem": "ConstructorIfaceFromSdk", "suggest": "", - "rule": "Construct signatures are not supported in interfaces (arkts-no-ctor-signatures-iface)", + "rule": "Construct signatures are not supported in interfaces.(sdk-ctor-signatures-iface)", "severity": "ERROR" }, { @@ -79,9 +79,9 @@ "column": 14, "endLine": 30, "endColumn": 15, - "problem": "ConstructorIface", + "problem": "ConstructorIfaceFromSdk", "suggest": "", - "rule": "Construct signatures are not supported in interfaces (arkts-no-ctor-signatures-iface)", + "rule": "Construct signatures are not supported in interfaces.(sdk-ctor-signatures-iface)", "severity": "ERROR" }, { @@ -95,4 +95,4 @@ "severity": "ERROR" } ] -} \ No newline at end of file +}