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 {
3232 string getName ( ) { result = this .lookup ( "name" ) .( YamlString ) .getValue ( ) }
3333
3434 /** Gets the name of the workflow file. */
35- string getFileName ( ) { result = this .getLocation ( ) . getFile ( ) .getBaseName ( ) }
35+ string getFileName ( ) { result = this .getFile ( ) .getBaseName ( ) }
3636
3737 /** Gets the `on:` in this workflow. */
3838 On getOn ( ) { result = this .lookup ( "on" ) }
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ private module ServerLess {
1515 * `codeURI` defaults to the empty string if no explicit value is set in the configuration.
1616 */
1717 private predicate hasServerlessHandler ( File ymlFile , string handler , string codeUri ) {
18- exists ( YamlMapping resource | ymlFile = resource .getLocation ( ) . getFile ( ) |
18+ exists ( YamlMapping resource | ymlFile = resource .getFile ( ) |
1919 // There exists at least "AWS::Serverless::Function" and "Aliyun::Serverless::Function"
2020 resource .lookup ( "Type" ) .( YamlScalar ) .getValue ( ) .regexpMatch ( ".*::Serverless::Function" ) and
2121 exists ( YamlMapping properties | properties = resource .lookup ( "Properties" ) |
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ module ESLint {
6262 /** An `.eslintrc.yaml` file. */
6363 private class EslintrcYaml extends Configuration instanceof YamlMapping {
6464 EslintrcYaml ( ) {
65- exists ( string n | n = this . getFile ( ) .getBaseName ( ) |
65+ exists ( string n | n = getFile ( ) .getBaseName ( ) |
6666 n = ".eslintrc.yaml" or n = ".eslintrc.yml" or n = ".eslintrc"
6767 )
6868 }
Original file line number Diff line number Diff line change @@ -150,6 +150,9 @@ module Make<InputSig Input> {
150150 * ```
151151 */
152152 class YamlNode instanceof Input:: NodeBase {
153+ /** Gets the file this node comes from. */
154+ Input:: File getFile ( ) { result = this .getLocation ( ) .getFile ( ) }
155+
153156 /**
154157 * Gets the `Location` of this node.
155158 */
You can’t perform that action at this time.
0 commit comments