mirror of
https://github.com/github/codeql.git
synced 2026-04-25 00:35:20 +02:00
Merge pull request #15473 from github/koesie10/ruby-model-only-public-methods
Ruby: Only generate models for public methods
This commit is contained in:
@@ -43,6 +43,7 @@ string getArgumentPath(DataFlow::ParameterNode paramNode) {
|
||||
*/
|
||||
predicate pathToMethod(DataFlow::MethodNode method, string type, string path) {
|
||||
method.getLocation().getFile() instanceof RelevantFile and
|
||||
method.isPublic() and // only public methods are modeled
|
||||
exists(DataFlow::ModuleNode mod, string methodName |
|
||||
method = mod.getOwnInstanceMethod(methodName) and
|
||||
if methodName = "initialize"
|
||||
|
||||
Reference in New Issue
Block a user