Ruby: Add test for FrameworkModeEndpoints query

This commit is contained in:
Harry Maclean
2023-11-27 14:18:18 +00:00
parent f40f2db3ab
commit bd575db254
8 changed files with 65 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
| lib/module.rb:2:3:3:5 | foo | mylib | M1 | foo | (x,y) | false | module.rb | |
| lib/module.rb:5:3:6:5 | self_foo | mylib | M1! | self_foo | (x,y) | false | module.rb | |
| lib/mylib.rb:4:3:5:5 | foo | mylib | A | foo | (x,y,key1:) | false | mylib.rb | |
| lib/mylib.rb:7:3:8:5 | bar | mylib | A | bar | (x) | false | mylib.rb | |
| lib/mylib.rb:10:3:11:5 | self_foo | mylib | A! | self_foo | (x,y) | false | mylib.rb | |
| lib/mylib.rb:19:5:20:7 | foo | mylib | A::ANested | foo | (x,y) | false | mylib.rb | |
| lib/other.rb:6:3:7:5 | foo | mylib | B | foo | (x,y) | false | other.rb | |
| other_lib/lib/other_gem.rb:3:9:4:11 | foo | other-lib | OtherLib::A | foo | (x,y) | false | other_gem.rb | |

View File

@@ -0,0 +1 @@
utils/modeleditor/FrameworkModeEndpoints.ql

View File

@@ -0,0 +1,7 @@
module M1
def foo(x, y)
end
def self.self_foo(x, y)
end
end

View File

@@ -0,0 +1,27 @@
require_relative "./other"
class A
def foo(x, y, key1:, **kwargs, &block)
end
def bar(x, *args)
end
def self.self_foo(x, y)
end
private
def private_1(x, y)
end
class ANested
def foo(x, y)
end
private
def private_2(x, y)
end
end
end

View File

@@ -0,0 +1,12 @@
require_relative "./module"
class B
include M1
def foo(x, y)
end
end
class C
extend M1
end

View File

@@ -0,0 +1,3 @@
Gem::Specification.new do |s|
s.name = "mylib"
end

View File

@@ -0,0 +1,6 @@
module OtherLib
class A
def foo(x, y)
end
end
end

View File

@@ -0,0 +1 @@
Gem::Specification.new("other-lib")