File tree Expand file tree Collapse file tree 3 files changed +0
-29
lines changed
src/codeql_ruby/frameworks
test/library-tests/frameworks Expand file tree Collapse file tree 3 files changed +0
-29
lines changed Original file line number Diff line number Diff line change @@ -7,9 +7,6 @@ private import codeql_ruby.ast.internal.Module
77private import ActionController
88
99predicate inActionViewContext ( AstNode n ) {
10- // Within a view component
11- n .getEnclosingModule ( ) instanceof ViewComponentClass
12- or
1310 // Within a template
1411 // TODO: n.getLocation().getFile() instanceof ErbFile
1512 n .getLocation ( ) .getFile ( ) .getExtension ( ) = "erb"
@@ -121,28 +118,6 @@ abstract class RenderToCall extends MethodCall {
121118// A call to `render_to` from within a template or view component.
122119private class ActionViewRenderToCall extends ActionViewContextCall , RenderToCall { }
123120
124- private class ViewComponentBaseAccess extends ConstantReadAccess {
125- ViewComponentBaseAccess ( ) {
126- this .getName ( ) = "Base" and
127- this .getScopeExpr ( ) .( ConstantAccess ) .getName ( ) = "ViewComponent"
128- }
129- }
130-
131- /**
132- * A class extending `ViewComponent::Base`.
133- */
134- class ViewComponentClass extends ClassDeclaration {
135- ViewComponentClass ( ) {
136- // class Foo < ViewComponent::Base
137- this .getSuperclassExpr ( ) instanceof ViewComponentBaseAccess
138- or
139- // class Bar < Foo
140- exists ( ViewComponentClass other |
141- other .getModule ( ) = resolveScopeExpr ( this .getSuperclassExpr ( ) )
142- )
143- }
144- }
145-
146121/**
147122 * A call to the ActionView `link_to` helper method.
148123 *
Original file line number Diff line number Diff line change @@ -17,7 +17,5 @@ renderCalls
1717| app/views/foo/bars/show.html.erb:31:5:31:89 | call to render |
1818renderToCalls
1919| app/controllers/foo/bars_controller.rb:10:16:10:97 | call to render_to_string |
20- viewComponentClasses
21- | app/components/DummyComponent.rb:1:1:2:3 | DummyComponent |
2220linkToCalls
2321| app/views/foo/bars/show.html.erb:33:5:33:41 | call to link_to |
Original file line number Diff line number Diff line change @@ -9,6 +9,4 @@ query predicate renderCalls(RenderCall c) { any() }
99
1010query predicate renderToCalls ( RenderToCall c ) { any ( ) }
1111
12- query predicate viewComponentClasses ( ViewComponentClass cls ) { any ( ) }
13-
1412query predicate linkToCalls ( LinkToCall c ) { any ( ) }
You can’t perform that action at this time.
0 commit comments