!474 [ArkTS Linter] Fix #18113: arkts-identifiers-as-prop-names report information is not placed properly

Merge pull request !474 from Evgeniy Okolnov/arkts-linter-18113
This commit is contained in:
openharmony_ci 2024-09-14 04:52:30 +00:00 committed by Gitee
commit c76d5c4edc
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
6 changed files with 16 additions and 16 deletions

View File

@ -198259,7 +198259,7 @@ var ts;
if (!ArkTSLinter_1_1.Autofixer.shouldAutofix(node, FaultID.LiteralAsPropertyName)) {
autofix = undefined;
}
this.incrementCounters(node, FaultID.LiteralAsPropertyName, autofixable, autofix);
this.incrementCounters(node.name, FaultID.LiteralAsPropertyName, autofixable, autofix);
}
var decorators = ts.getDecorators(node);
this.filterOutDecoratorsDiagnostics(decorators, ArkTSLinter_1_1.Utils.NON_INITIALIZABLE_PROPERTY_DECORATORS, { begin: propName.getStart(), end: propName.getStart() }, ArkTSLinter_1_1.Utils.PROPERTY_HAS_NO_INITIALIZER_ERROR_CODE);
@ -198317,7 +198317,7 @@ var ts;
if (!ArkTSLinter_1_1.Autofixer.shouldAutofix(node, FaultID.LiteralAsPropertyName)) {
autofix = undefined;
}
this.incrementCounters(node, FaultID.LiteralAsPropertyName, autofixable, autofix);
this.incrementCounters(node.name, FaultID.LiteralAsPropertyName, autofixable, autofix);
}
};
TypeScriptLinter.prototype.handlePropertySignature = function (node) {
@ -198328,7 +198328,7 @@ var ts;
if (!ArkTSLinter_1_1.Autofixer.shouldAutofix(node, FaultID.LiteralAsPropertyName)) {
autofix = undefined;
}
this.incrementCounters(node, FaultID.LiteralAsPropertyName, autofixable, autofix);
this.incrementCounters(node.name, FaultID.LiteralAsPropertyName, autofixable, autofix);
}
this.handleSendableInterfaceProperty(node);
};

View File

@ -198004,7 +198004,7 @@ var ts;
if (!ArkTSLinter_1_1.Autofixer.shouldAutofix(node, FaultID.LiteralAsPropertyName)) {
autofix = undefined;
}
this.incrementCounters(node, FaultID.LiteralAsPropertyName, autofixable, autofix);
this.incrementCounters(node.name, FaultID.LiteralAsPropertyName, autofixable, autofix);
}
var decorators = ts.getDecorators(node);
this.filterOutDecoratorsDiagnostics(decorators, ArkTSLinter_1_1.Utils.NON_INITIALIZABLE_PROPERTY_DECORATORS, { begin: propName.getStart(), end: propName.getStart() }, ArkTSLinter_1_1.Utils.PROPERTY_HAS_NO_INITIALIZER_ERROR_CODE);
@ -198062,7 +198062,7 @@ var ts;
if (!ArkTSLinter_1_1.Autofixer.shouldAutofix(node, FaultID.LiteralAsPropertyName)) {
autofix = undefined;
}
this.incrementCounters(node, FaultID.LiteralAsPropertyName, autofixable, autofix);
this.incrementCounters(node.name, FaultID.LiteralAsPropertyName, autofixable, autofix);
}
};
TypeScriptLinter.prototype.handlePropertySignature = function (node) {
@ -198073,7 +198073,7 @@ var ts;
if (!ArkTSLinter_1_1.Autofixer.shouldAutofix(node, FaultID.LiteralAsPropertyName)) {
autofix = undefined;
}
this.incrementCounters(node, FaultID.LiteralAsPropertyName, autofixable, autofix);
this.incrementCounters(node.name, FaultID.LiteralAsPropertyName, autofixable, autofix);
}
this.handleSendableInterfaceProperty(node);
};

View File

@ -187098,7 +187098,7 @@ var ts;
if (!ArkTSLinter_1_1.Autofixer.shouldAutofix(node, FaultID.LiteralAsPropertyName)) {
autofix = undefined;
}
this.incrementCounters(node, FaultID.LiteralAsPropertyName, autofixable, autofix);
this.incrementCounters(node.name, FaultID.LiteralAsPropertyName, autofixable, autofix);
}
var decorators = ts.getDecorators(node);
this.filterOutDecoratorsDiagnostics(decorators, ArkTSLinter_1_1.Utils.NON_INITIALIZABLE_PROPERTY_DECORATORS, { begin: propName.getStart(), end: propName.getStart() }, ArkTSLinter_1_1.Utils.PROPERTY_HAS_NO_INITIALIZER_ERROR_CODE);
@ -187156,7 +187156,7 @@ var ts;
if (!ArkTSLinter_1_1.Autofixer.shouldAutofix(node, FaultID.LiteralAsPropertyName)) {
autofix = undefined;
}
this.incrementCounters(node, FaultID.LiteralAsPropertyName, autofixable, autofix);
this.incrementCounters(node.name, FaultID.LiteralAsPropertyName, autofixable, autofix);
}
};
TypeScriptLinter.prototype.handlePropertySignature = function (node) {
@ -187167,7 +187167,7 @@ var ts;
if (!ArkTSLinter_1_1.Autofixer.shouldAutofix(node, FaultID.LiteralAsPropertyName)) {
autofix = undefined;
}
this.incrementCounters(node, FaultID.LiteralAsPropertyName, autofixable, autofix);
this.incrementCounters(node.name, FaultID.LiteralAsPropertyName, autofixable, autofix);
}
this.handleSendableInterfaceProperty(node);
};

View File

@ -187098,7 +187098,7 @@ var ts;
if (!ArkTSLinter_1_1.Autofixer.shouldAutofix(node, FaultID.LiteralAsPropertyName)) {
autofix = undefined;
}
this.incrementCounters(node, FaultID.LiteralAsPropertyName, autofixable, autofix);
this.incrementCounters(node.name, FaultID.LiteralAsPropertyName, autofixable, autofix);
}
var decorators = ts.getDecorators(node);
this.filterOutDecoratorsDiagnostics(decorators, ArkTSLinter_1_1.Utils.NON_INITIALIZABLE_PROPERTY_DECORATORS, { begin: propName.getStart(), end: propName.getStart() }, ArkTSLinter_1_1.Utils.PROPERTY_HAS_NO_INITIALIZER_ERROR_CODE);
@ -187156,7 +187156,7 @@ var ts;
if (!ArkTSLinter_1_1.Autofixer.shouldAutofix(node, FaultID.LiteralAsPropertyName)) {
autofix = undefined;
}
this.incrementCounters(node, FaultID.LiteralAsPropertyName, autofixable, autofix);
this.incrementCounters(node.name, FaultID.LiteralAsPropertyName, autofixable, autofix);
}
};
TypeScriptLinter.prototype.handlePropertySignature = function (node) {
@ -187167,7 +187167,7 @@ var ts;
if (!ArkTSLinter_1_1.Autofixer.shouldAutofix(node, FaultID.LiteralAsPropertyName)) {
autofix = undefined;
}
this.incrementCounters(node, FaultID.LiteralAsPropertyName, autofixable, autofix);
this.incrementCounters(node.name, FaultID.LiteralAsPropertyName, autofixable, autofix);
}
this.handleSendableInterfaceProperty(node);
};

View File

@ -733,7 +733,7 @@ export class TypeScriptLinter {
if (!Autofixer.shouldAutofix(node, FaultID.LiteralAsPropertyName)) {
autofix = undefined;
}
this.incrementCounters(node, FaultID.LiteralAsPropertyName, autofixable, autofix);
this.incrementCounters(node.name, FaultID.LiteralAsPropertyName, autofixable, autofix);
}
const decorators = ts.getDecorators(node);
this.filterOutDecoratorsDiagnostics(decorators, Utils.NON_INITIALIZABLE_PROPERTY_DECORATORS,
@ -797,7 +797,7 @@ export class TypeScriptLinter {
if (!Autofixer.shouldAutofix(node, FaultID.LiteralAsPropertyName)) {
autofix = undefined;
}
this.incrementCounters(node, FaultID.LiteralAsPropertyName, autofixable, autofix);
this.incrementCounters(node.name, FaultID.LiteralAsPropertyName, autofixable, autofix);
}
}
@ -809,7 +809,7 @@ export class TypeScriptLinter {
if (!Autofixer.shouldAutofix(node, FaultID.LiteralAsPropertyName)) {
autofix = undefined;
}
this.incrementCounters(node, FaultID.LiteralAsPropertyName, autofixable, autofix);
this.incrementCounters(node.name, FaultID.LiteralAsPropertyName, autofixable, autofix);
}
this.handleSendableInterfaceProperty(node);
}

View File

@ -230,7 +230,7 @@
"messageText": "Objects with property names that are not identifiers are not supported (arkts-identifiers-as-prop-names)",
"expectLineAndCharacter": {
"line": 51,
"character": 3
"character": 10
}
},
{