/home/djigo/.rvm/gems/ruby-2.5.5/bin/ruby_executable_hooks:24:in
eval'
/home/djigo/.rvm/gems/ruby-2.5.5/bin/ruby_executable_hooks:24:inBe clear, concise and precise in your description of the problem.
Open an issue with a descriptive title and a summary in grammatically correct,
complete sentences.
Use the template below when reporting bugs. Please, make sure that
you're running the latest stable RuboCop and that the problem you're reporting
hasn't been reported (and potentially fixed) already.
Before filing the ticket you should replace all text above the horizontal
rule with your own words.
Describe here how you expected RuboCop to behave in this particular situation
To do the "rubocop --auto-correct --disable-uncorrectable" command and finish the analysis and correction properly
Describe here what actually happened.
An error is prompted
106 files inspected, 9554 offenses detected, 9526 offenses corrected
undefined methodlocation' for nil:NilClass
/home/djigo/.rvm/gems/ruby-2.5.5/gems/rubocop-0.76.0/lib/rubocop/cop/cop.rb:176:in disable_uncorrectable'
/home/djigo/.rvm/gems/ruby-2.5.5/gems/rubocop-0.76.0/lib/rubocop/cop/cop.rb:161:incorrect'
/home/djigo/.rvm/gems/ruby-2.5.5/gems/rubocop-0.76.0/lib/rubocop/cop/cop.rb:134:in add_offense'
/home/djigo/.rvm/gems/ruby-2.5.5/gems/rubocop-0.76.0/lib/rubocop/cop/lint/syntax.rb:35:inadd_offense_from_diagnostic'
/home/djigo/.rvm/gems/ruby-2.5.5/gems/rubocop-0.76.0/lib/rubocop/cop/lint/syntax.rb:24:in block in offenses_from_processed_source'
/home/djigo/.rvm/gems/ruby-2.5.5/gems/rubocop-0.76.0/lib/rubocop/cop/lint/syntax.rb:23:ineach'
/home/djigo/.rvm/gems/ruby-2.5.5/gems/rubocop-0.76.0/lib/rubocop/cop/lint/syntax.rb:23:in offenses_from_processed_source'
/home/djigo/.rvm/gems/ruby-2.5.5/gems/rubocop-0.76.0/lib/rubocop/cop/team.rb:39:ininspect_file'
/home/djigo/.rvm/gems/ruby-2.5.5/gems/rubocop-0.76.0/lib/rubocop/runner.rb:290:in inspect_file'
/home/djigo/.rvm/gems/ruby-2.5.5/gems/rubocop-0.76.0/lib/rubocop/runner.rb:238:inblock in do_inspection_loop'
/home/djigo/.rvm/gems/ruby-2.5.5/gems/rubocop-0.76.0/lib/rubocop/runner.rb:270:in block in iterate_until_no_changes'
/home/djigo/.rvm/gems/ruby-2.5.5/gems/rubocop-0.76.0/lib/rubocop/runner.rb:263:inloop'
/home/djigo/.rvm/gems/ruby-2.5.5/gems/rubocop-0.76.0/lib/rubocop/runner.rb:263:in iterate_until_no_changes'
/home/djigo/.rvm/gems/ruby-2.5.5/gems/rubocop-0.76.0/lib/rubocop/runner.rb:234:indo_inspection_loop'
/home/djigo/.rvm/gems/ruby-2.5.5/gems/rubocop-0.76.0/lib/rubocop/runner.rb:119:in block in file_offenses'
/home/djigo/.rvm/gems/ruby-2.5.5/gems/rubocop-0.76.0/lib/rubocop/runner.rb:137:infile_offense_cache'
/home/djigo/.rvm/gems/ruby-2.5.5/gems/rubocop-0.76.0/lib/rubocop/runner.rb:117:in file_offenses'
/home/djigo/.rvm/gems/ruby-2.5.5/gems/rubocop-0.76.0/lib/rubocop/runner.rb:108:inprocess_file'
/home/djigo/.rvm/gems/ruby-2.5.5/gems/rubocop-0.76.0/lib/rubocop/runner.rb:87:in block in each_inspected_file'
/home/djigo/.rvm/gems/ruby-2.5.5/gems/rubocop-0.76.0/lib/rubocop/runner.rb:86:ineach'
/home/djigo/.rvm/gems/ruby-2.5.5/gems/rubocop-0.76.0/lib/rubocop/runner.rb:86:in reduce'
/home/djigo/.rvm/gems/ruby-2.5.5/gems/rubocop-0.76.0/lib/rubocop/runner.rb:86:ineach_inspected_file'
/home/djigo/.rvm/gems/ruby-2.5.5/gems/rubocop-0.76.0/lib/rubocop/runner.rb:73:in inspect_files'
/home/djigo/.rvm/gems/ruby-2.5.5/gems/rubocop-0.76.0/lib/rubocop/runner.rb:39:inrun'
/home/djigo/.rvm/gems/ruby-2.5.5/gems/rubocop-0.76.0/lib/rubocop/cli.rb:213:in execute_runner'
/home/djigo/.rvm/gems/ruby-2.5.5/gems/rubocop-0.76.0/lib/rubocop/cli.rb:80:inexecute_runners'
/home/djigo/.rvm/gems/ruby-2.5.5/gems/rubocop-0.76.0/lib/rubocop/cli.rb:51:in run'
/home/djigo/.rvm/gems/ruby-2.5.5/gems/rubocop-0.76.0/exe/rubocop:13:inblock in realtime'
/home/djigo/.rvm/gems/ruby-2.5.5/gems/rubocop-0.76.0/exe/rubocop:12:inload'
/home/djigo/.rvm/gems/ruby-2.5.5/bin/rubocop:23:in
/home/djigo/.rvm/gems/ruby-2.5.5/bin/ruby_executable_hooks:24:in eval'
/home/djigo/.rvm/gems/ruby-2.5.5/bin/ruby_executable_hooks:24:in
This is extremely important! Providing us with a reliable way to reproduce
a problem will expedite its solution.
Run "rubocop --auto-correct --disable-uncorrectable"
Include the output of rubocop -V or bundle exec rubocop -V if using Bundler. Here's an example:
0.76.0 (using Parser 2.6.5.0, running on ruby 2.5.5 x86_64-linux)
$ [bundle exec] rubocop -V
0.76.0 (using Parser 2.5.1.2, running on ruby 2.5.1 x86_64-linux)
Use a file with a syntax error to reproduce this:
$ echo \" > 7513.rb
$ rubocop --auto-correct --disable-uncorrectable 7513.rb
Inspecting 1 file
.
0 files inspected, no offenses detected
undefined method `location' for nil:NilClass
/Users/buehmann/dev/rubocop/lib/rubocop/cop/cop.rb:176:in `disable_uncorrectable'
/Users/buehmann/dev/rubocop/lib/rubocop/cop/cop.rb:161:in `correct'
/Users/buehmann/dev/rubocop/lib/rubocop/cop/cop.rb:134:in `add_offense'
/Users/buehmann/dev/rubocop/lib/rubocop/cop/lint/syntax.rb:35:in `add_offense_from_diagnostic'
/Users/buehmann/dev/rubocop/lib/rubocop/cop/lint/syntax.rb:24:in `block in offenses_from_processed_source'
/Users/buehmann/dev/rubocop/lib/rubocop/cop/lint/syntax.rb:23:in `each'
/Users/buehmann/dev/rubocop/lib/rubocop/cop/lint/syntax.rb:23:in `offenses_from_processed_source'
Most helpful comment
Use a file with a syntax error to reproduce this: