Skip to content

Commit 338d383

Browse files
authored
Actions: Make Env non-abstract
`class Env` was previously abstract with no concrete descendants, so user queries like `any(Env e | ...)` would never produce results. In the JS library the corresponding class derived from `YamlNode` and has concrete descendants representing workflow-, job- and step-level `env` nodes. However these are dubiously useful since you can always just use `any(Step s).getEnv()` to achieve the same result. Since `EnvImpl` already fully characterises an `env` node, I simply make the class concrete.
1 parent 76c6d71 commit 338d383

File tree

1 file changed

+2
-2
lines changed
  • actions/ql/lib/codeql/actions

1 file changed

+2
-2
lines changed

actions/ql/lib/codeql/actions/Ast.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ class Expression extends AstNode instanceof ExpressionImpl {
5050
string getNormalizedExpression() { result = normalizeExpr(expression) }
5151
}
5252

53-
/** A common class for `env` in workflow, job or step. */
54-
abstract class Env extends AstNode instanceof EnvImpl {
53+
/** An `env` in workflow, job or step. */
54+
class Env extends AstNode instanceof EnvImpl {
5555
/** Gets an environment variable value given its name. */
5656
ScalarValueImpl getEnvVarValue(string name) { result = super.getEnvVarValue(name) }
5757

0 commit comments

Comments
 (0)