joern icon indicating copy to clipboard operation
joern copied to clipboard

[Bug] [RubySrc2Cpg] - Unable to parse ruby on rails schema.rb file

Open khemrajrathore opened this issue 1 year ago • 1 comments

Describe the bug For the given ruby source code, we are unable to parse

ActiveRecord::Schema[7.0].define(version: 2023_09_22_164903) do
     create_table "my_mappings", force: :cascade do |t|
            t.bigint "company_id", null: false
            t.bigint "center_id"
            t.bigint "target_id", null: false
     end
end
            

To Reproduce Steps to reproduce the behavior:

  1. Import the snippet using ImportCode.ruby.fromString

Expected behavior The snippet should get passed, and we should be able to query on the parsed nodes

khemrajrathore avatar Dec 27 '23 14:12 khemrajrathore

This sample parses without issues, it's just that we don't have a representation for member calls with the do-end notation yet. See #3928

xavierpinho avatar Dec 27 '23 16:12 xavierpinho