Skip to content

Commit 35c3c62

Browse files
committed
apply suggestions from code review
1 parent daed33f commit 35c3c62

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

javascript/ql/examples/queries/dataflow/TemplateInjection/TemplateInjection.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import DataFlow::PathGraph
1414
/**
1515
* Gets the name of an unescaped placeholder in a lodash template.
1616
*
17-
* For example, the string "<h1><%= title %></h1>" contains the placeholder "title".
17+
* For example, the string `"<h1><%= title %></h1>"` contains the placeholder "title".
1818
*/
1919
bindingset[s]
2020
string getAPlaceholderInString(string s) {

ql/ql/src/queries/style/MissingParameterInQlDoc.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ private string getAMentionedNonParameter(Predicate p) {
4242
) and
4343
result.regexpMatch("^[a-z]\\w+$") and
4444
not result.toLowerCase() = getAParameterName(p).toLowerCase() and
45-
not result = ["true", "false", "NaN", "this"] and // keywords
45+
not result = ["true", "false", "NaN", "this", "forall", "exists", "null", "break", "return"] and // keywords
46+
not result = any(Aggregate a).getKind() and // min, max, sum, count, etc.
4647
not result = getMentionedPredicates(p.getLocation().getFile()) and
4748
// variables inside the predicate are also fine
4849
not result = any(VarDecl var | var.getEnclosingPredicate() = p).getName()

0 commit comments

Comments
 (0)