pronto icon indicating copy to clipboard operation
pronto copied to clipboard

Pronto does nothing silently; rubocop and rails_best_pratices report errors

Open skwp opened this issue 11 years ago • 8 comments

I can confirm that rubocop and rails_best_practices both return a handful of errors, however running pronto results in zero comments both in its normal mode (pronto run master) and github mode (GITHUB_ACCESS_TOKEN=[....] PULL_REQUEST_ID=3147 pronto run -f github_pr)

Has anyone experienced this? Ruby 2.1.1 / Rails 4.1

skwp avatar Feb 04 '15 00:02 skwp

Contents of Gemfile:

gem 'pronto'
gem 'pronto-rubocop', require: false  #Ruby styleguide
gem 'pronto-rails_best_practices', require: false  #Ruby styleguide
gem 'pronto-scss', require: false
gem 'pronto-jshint', require: false
gem 'pronto-haml', require: false
gem 'pronto-reek', require: false     #Code Smells
gem 'pronto-brakeman', require: false #Security

Gemfile.lock

pronto (0.4.1)
    pronto-brakeman (0.4.0)
      pronto (~> 0.4.0)
    pronto-haml (0.4.0)
      pronto (~> 0.4.0)
    pronto-jshint (0.4.0)
      pronto (~> 0.4.0)
    pronto-rails_best_practices (0.4.0)
      pronto (~> 0.4.0)
    pronto-reek (0.4.0)
      pronto (~> 0.4.0)
    pronto-rubocop (0.4.0)
      pronto (~> 0.4.0)
    pronto-scss (0.4.0)
      pronto (~> 0.4.0)

skwp avatar Feb 04 '15 00:02 skwp

Apologies if this isn't related. I've had pronto report nothing when I'm on a branch that has uncommitted changes, or if there are little or no changes from master. Specifying one of these options helped:

# Have pronto analyze entire project since very first commit
pronto run --commit=$(git log --pretty=format:%H | tail -1)

# Have pronto analyze uncommitted changes
pronto run --index

eliotsykes avatar Apr 12 '15 15:04 eliotsykes

@skwp did @eliotsykes answer helped? Do you still encounter this issue with the current release (0.8.2)?

mmozuras avatar Mar 04 '17 13:03 mmozuras

Hello, I have the same issue here. My project is up to date and have no changes to commit. The only runners that I'm using that work along with pronto are flay, rubocop and poper. The others like reek or brakeman report lots of things when used separetely from pronto but report nothing when used along with it

lucashtm avatar Mar 09 '17 18:03 lucashtm

@LucasHMonteiro did you try to run in a (feature/development) branch with changes or master?

mmozuras avatar Mar 12 '17 16:03 mmozuras

@mmozuras I ran it in a feature/development branch and it worked well (except for brakeman that seems to have some problems on its own) and in the master branch it throws a NoMethodError for "this" method in the specifcation.rb file in the rubygems folder.

lucashtm avatar Mar 14 '17 17:03 lucashtm

@LucasHMonteiro could you post the stacktrace for the error?

Pronto is not supposed to be used on master. But I'd like to understand if there's a way to improve. What kind of behaviour did you expect?

mmozuras avatar Mar 16 '17 20:03 mmozuras

@mmozuras here goes the full stack trace

/home/sti/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:2158:in method_missing': undefined method this' for #<Gem::Specification:0xc75970 pronto-0.8.2> (NoMethodError) from /home/sti/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/specification.rb:1057:in find_active_stub_by_path' from /home/sti/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:64:in require' from /home/sti/.rvm/gems/ruby-2.3.1/gems/pronto-rails_best_practices-0.8.0/lib/pronto/rails_best_practices.rb:1:in <top (required)>' from /home/sti/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in require' from /home/sti/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in rescue in require' from /home/sti/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in require' from /home/sti/.rvm/gems/ruby-2.3.1/gems/pronto-0.8.2/lib/pronto/cli.rb:47:in block in run' from /home/sti/.rvm/gems/ruby-2.3.1/gems/pronto-0.8.2/lib/pronto/cli.rb:46:in each' from /home/sti/.rvm/gems/ruby-2.3.1/gems/pronto-0.8.2/lib/pronto/cli.rb:46:in run' from /home/sti/.rvm/gems/ruby-2.3.1/gems/thor-0.19.4/lib/thor/command.rb:27:in run' from /home/sti/.rvm/gems/ruby-2.3.1/gems/thor-0.19.4/lib/thor/invocation.rb:126:in invoke_command' from /home/sti/.rvm/gems/ruby-2.3.1/gems/thor-0.19.4/lib/thor.rb:369:in dispatch' from /home/sti/.rvm/gems/ruby-2.3.1/gems/thor-0.19.4/lib/thor/base.rb:444:in start' from /home/sti/.rvm/gems/ruby-2.3.1/gems/pronto-0.8.2/bin/pronto:6:in <top (required)>' from /home/sti/.rvm/gems/ruby-2.3.1/bin/pronto:23:in load' from /home/sti/.rvm/gems/ruby-2.3.1/bin/pronto:23:in <main>' from /home/sti/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in eval' from /home/sti/.rvm/gems/ruby-2.3.1/bin/ruby_executable_hooks:15:in <main>'

I'm not intending to run pronto on ´master´, just did it cause you mentioned it and wanted to see the behavior.

lucashtm avatar Mar 17 '17 16:03 lucashtm