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() {
|
||||
this = invk.getArgument(maxArity(invk)).asExpr() and
|
||||
not invk.isIncomplete()
|
||||
not invk.isIncomplete() and
|
||||
not invk.getAstNode() instanceof TaggedTemplateExpr
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -130,3 +130,12 @@ function sum2() {
|
||||
|
||||
// OK
|
||||
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