File tree Expand file tree Collapse file tree 4 files changed +6
-3
lines changed
javascript/ql/lib/semmle/javascript Expand file tree Collapse file tree 4 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ module Actions {
32
32
string getName ( ) { result = this .lookup ( "name" ) .( YamlString ) .getValue ( ) }
33
33
34
34
/** Gets the name of the workflow file. */
35
- string getFileName ( ) { result = this .getLocation ( ) . getFile ( ) .getBaseName ( ) }
35
+ string getFileName ( ) { result = this .getFile ( ) .getBaseName ( ) }
36
36
37
37
/** Gets the `on:` in this workflow. */
38
38
On getOn ( ) { result = this .lookup ( "on" ) }
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ private module ServerLess {
15
15
* `codeURI` defaults to the empty string if no explicit value is set in the configuration.
16
16
*/
17
17
private predicate hasServerlessHandler ( File ymlFile , string handler , string codeUri ) {
18
- exists ( YamlMapping resource | ymlFile = resource .getLocation ( ) . getFile ( ) |
18
+ exists ( YamlMapping resource | ymlFile = resource .getFile ( ) |
19
19
// There exists at least "AWS::Serverless::Function" and "Aliyun::Serverless::Function"
20
20
resource .lookup ( "Type" ) .( YamlScalar ) .getValue ( ) .regexpMatch ( ".*::Serverless::Function" ) and
21
21
exists ( YamlMapping properties | properties = resource .lookup ( "Properties" ) |
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ module ESLint {
62
62
/** An `.eslintrc.yaml` file. */
63
63
private class EslintrcYaml extends Configuration instanceof YamlMapping {
64
64
EslintrcYaml ( ) {
65
- exists ( string n | n = this . getFile ( ) .getBaseName ( ) |
65
+ exists ( string n | n = getFile ( ) .getBaseName ( ) |
66
66
n = ".eslintrc.yaml" or n = ".eslintrc.yml" or n = ".eslintrc"
67
67
)
68
68
}
Original file line number Diff line number Diff line change @@ -150,6 +150,9 @@ module Make<InputSig Input> {
150
150
* ```
151
151
*/
152
152
class YamlNode instanceof Input:: NodeBase {
153
+ /** Gets the file this node comes from. */
154
+ Input:: File getFile ( ) { result = this .getLocation ( ) .getFile ( ) }
155
+
153
156
/**
154
157
* Gets the `Location` of this node.
155
158
*/
You can’t perform that action at this time.
0 commit comments