mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Hygiene linting for extensions + new rule (#7843)
* linting for extensions + new rule * Remove unneeded array * Fix spelling mistake * Fix bad merge
This commit is contained in:
@@ -68,9 +68,7 @@ class DoubleQuotedStringArgRuleWalker extends Lint.RuleWalker {
|
||||
const doubleQuotedArg = argText.length >= 2 && argText[0] === DoubleQuotedStringArgRuleWalker.DOUBLE_QUOTE && argText[argText.length - 1] === DoubleQuotedStringArgRuleWalker.DOUBLE_QUOTE;
|
||||
|
||||
if (!doubleQuotedArg) {
|
||||
const fix = [
|
||||
Lint.Replacement.replaceFromTo(arg.getStart(), arg.getWidth(), `"${arg.getText().slice(1, arg.getWidth() - 2)}"`),
|
||||
];
|
||||
const fix = Lint.Replacement.replaceFromTo(arg.getStart(), arg.getEnd(), `"${arg.getText().slice(1, arg.getWidth() - 1)}"`);
|
||||
this.addFailure(this.createFailure(
|
||||
arg.getStart(), arg.getWidth(),
|
||||
`Argument ${this.argIndex! + 1} to '${functionName}' must be double quoted.`, fix));
|
||||
|
||||
Reference in New Issue
Block a user