SublimeLinter / SublimeLinter-rubocop

SublimeLinter 3 plugin for Ruby, using rubocop.
MIT License
159 stars 40 forks source link

Errors with Ruby 2.3.1 #33

Closed williamcotton closed 7 years ago

williamcotton commented 8 years ago
SublimeLinter: rubocop version query: /Users/wcotton/.rbenv/shims/ruby -S rubocop --version 
SublimeLinter: rubocop version: 0.41.2 
SublimeLinter: rubocop: (>= 0.34.0) satisfied by 0.41.2 
SublimeLinter: rubocop activated: ['/Users/wcotton/.rbenv/shims/ruby'] 
SublimeLinter: rubocop: places_service.rb ['ruby', '-S', 'rubocop', '--format', 'emacs', '--force-exclusion', '--stdin', '/Users/wcotton/Projects/rails_app/app/services/places_service.rb'] 
SublimeLinter: rubocop output:
ruby: no Ruby script found in input (LoadError) 

So I tried running the command that is being constructed manually:

$ ruby -S rubocop --format emacs --force-exclusion --stdin /Users/wcotton/Projects/rails_app/app/services/places_service.rb
ruby: no Ruby script found in input (LoadError)

And I get the same error. But this works:

$ ruby -S rubocop --format emacs --force-exclusion -- /Users/wcotton/Projects/rails_app/app/services/places_service.rb
/Users/wcotton/Projects/rails_app/app/services/places_service.rb:2:3: C: Use `module_function` instead of `extend self`.
$ ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
williamcotton commented 8 years ago

Everything works fine with Ruby 2.1.9.

ljkbennett commented 7 years ago

Hi @williamcotton I realise this is an old one, but I've just come on board and am reviewing all open issues. Can you confirm if you are still having the problem? I've been using it with 2.3.1 up to now with no problem.

ljkbennett commented 7 years ago

No response on this for a couple of weeks. If anyone comes across this and is still having an issue, please open a new one referencing this.