mirror of
https://github.com/github/codeql.git
synced 2025-12-21 19:26:31 +01:00
exclude tagged template literals from js/superfluous-trailing-arguments
This commit is contained in:
@@ -46,7 +46,8 @@ class SpuriousArguments extends Expr {
|
|||||||
|
|
||||||
SpuriousArguments() {
|
SpuriousArguments() {
|
||||||
this = invk.getArgument(maxArity(invk)).asExpr() and
|
this = invk.getArgument(maxArity(invk)).asExpr() and
|
||||||
not invk.isIncomplete()
|
not invk.isIncomplete() and
|
||||||
|
not invk.getAstNode() instanceof TaggedTemplateExpr
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -129,4 +129,13 @@ function sum2() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// OK
|
// OK
|
||||||
sum2(1, 2, 3);
|
sum2(1, 2, 3);
|
||||||
|
|
||||||
|
const $ = function (x, arr) {
|
||||||
|
console.log(x, arr);
|
||||||
|
};
|
||||||
|
|
||||||
|
// OK
|
||||||
|
async function tagThing(repoUrl, directory) {
|
||||||
|
await $`git clone ${repoUrl} ${directory}`;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user