Skip to content

Commit

Permalink
add explanation to query
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Brignull committed Sep 16, 2020
1 parent 4c4114f commit 090a701
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions queries/required-action-input.ql
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ class CoreGetInputMethodCallExpr extends MethodCallExpr {

from ActionDeclaration action, CoreGetInputMethodCallExpr getInputCall, string inputName, string alternateFunction
where action.getAnInput() = inputName
// We don't want to create an alert for the users core.getInput in the getRequiredInput
// and getOptionalInput functions themselves, and this check here does that in a
// roundabout way by checking the parameter is a string literal. This should be enough
// and hopefully won't discount any real calls to core.getInput, but is worth noting here.
and getInputCall.getInputName() = inputName
and ((action.inputAlwaysHasValue(inputName) and alternateFunction = "getRequiredInput")
or (not action.inputAlwaysHasValue(inputName) and alternateFunction = "geOptionalInput"))
Expand Down

0 comments on commit 090a701

Please sign in to comment.