prontolabs / pronto-flay

Pronto runner for Flay, structural similarities analyzer
MIT License
19 stars 17 forks source link

undefined method `added_lines' for nil #24

Open KieranP opened 1 month ago

KieranP commented 1 month ago

Running latest version of flay and pronto-flay

/home/circleci/project/vendor/bundle/ruby/3.3.0/gems/pronto-flay-0.11.1/lib/pronto/flay.rb:40:in `block in messages': undefined method `added_lines' for nil (NoMethodError)

        line = patch.added_lines.find do |added_line|
                    ^^^^^^^^^^^^
        from /home/circleci/project/vendor/bundle/ruby/3.3.0/gems/pronto-flay-0.11.1/lib/pronto/flay.rb:37:in `map'
        from /home/circleci/project/vendor/bundle/ruby/3.3.0/gems/pronto-flay-0.11.1/lib/pronto/flay.rb:37:in `messages'
        from /home/circleci/project/vendor/bundle/ruby/3.3.0/gems/pronto-flay-0.11.1/lib/pronto/flay.rb:14:in `run'
        from /home/circleci/project/vendor/bundle/ruby/3.3.0/gems/pronto-0.11.2/lib/pronto/runners.rb:20:in `block in run'
        from /home/circleci/project/vendor/bundle/ruby/3.3.0/gems/pronto-0.11.2/lib/pronto/runners.rb:13:in `each'
        from /home/circleci/project/vendor/bundle/ruby/3.3.0/gems/pronto-0.11.2/lib/pronto/runners.rb:13:in `run'
        from /home/circleci/project/vendor/bundle/ruby/3.3.0/gems/pronto-0.11.2/lib/pronto.rb:66:in `run'
        from /home/circleci/project/vendor/bundle/ruby/3.3.0/gems/pronto-0.11.2/lib/pronto/cli.rb:70:in `block in run'
        from /home/circleci/project/vendor/bundle/ruby/3.3.0/gems/pronto-0.11.2/lib/pronto/cli.rb:68:in `chdir'
        from /home/circleci/project/vendor/bundle/ruby/3.3.0/gems/pronto-0.11.2/lib/pronto/cli.rb:68:in `run'
        from /home/circleci/project/vendor/bundle/ruby/3.3.0/gems/thor-1.3.2/lib/thor/command.rb:28:in `run'
        from /home/circleci/project/vendor/bundle/ruby/3.3.0/gems/thor-1.3.2/lib/thor/invocation.rb:127:in `invoke_command'
        from /home/circleci/project/vendor/bundle/ruby/3.3.0/gems/thor-1.3.2/lib/thor.rb:538:in `dispatch'
        from /home/circleci/project/vendor/bundle/ruby/3.3.0/gems/thor-1.3.2/lib/thor/base.rb:584:in `start'
        from /home/circleci/project/vendor/bundle/ruby/3.3.0/gems/pronto-0.11.2/bin/pronto:6:in `<top (required)>'
        from /home/circleci/project/vendor/bundle/ruby/3.3.0/bin/pronto:25:in `load'
        from /home/circleci/project/vendor/bundle/ruby/3.3.0/bin/pronto:25:in `<top (required)>'
        from /home/circleci/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/bundler-2.5.11/lib/bundler/cli/exec.rb:58:in `load'
        from /home/circleci/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/bundler-2.5.11/lib/bundler/cli/exec.rb:58:in `kernel_load'
        from /home/circleci/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/bundler-2.5.11/lib/bundler/cli/exec.rb:23:in `run'
        from /home/circleci/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/bundler-2.5.11/lib/bundler/cli.rb:455:in `exec'
        from /home/circleci/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/bundler-2.5.11/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
        from /home/circleci/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/bundler-2.5.11/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
        from /home/circleci/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/bundler-2.5.11/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
        from /home/circleci/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/bundler-2.5.11/lib/bundler/cli.rb:35:in `dispatch'
        from /home/circleci/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/bundler-2.5.11/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
        from /home/circleci/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/bundler-2.5.11/lib/bundler/cli.rb:29:in `start'
        from /home/circleci/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/bundler-2.5.11/exe/bundle:28:in `block in <top (required)>'
        from /home/circleci/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/bundler-2.5.11/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
        from /home/circleci/.asdf/installs/ruby/3.3.4/lib/ruby/gems/3.3.0/gems/bundler-2.5.11/exe/bundle:20:in `<top (required)>'
        from /home/circleci/.asdf/installs/ruby/3.3.4/bin/bundle:25:in `load'
        from /home/circleci/.asdf/installs/ruby/3.3.4/bin/bundle:25:in `<main>'
EduardoRSeifert commented 3 weeks ago

I opened a PR to fix this problem:

25