You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm shaping up some specs files and I have disabled all the cops which where detecting an infraction:
$ rubocop spec/specification_spec.rbInspecting 1 file.1 file inspected, no offences detected
I would then expect that the automatic fix would not modify the file, instead it does:
$ rubocop spec/specification_spec.rb -aInspecting 1 fileEOffenses:spec/specification_spec.rb:98:34: W: ambiguous first argument; parenthesize arguments or add whitespace to the right end.message.should.match /Invalid string representation/ ^spec/specification_spec.rb:235:31: E: unexpected token tLCURLY s.subspec 'Subspec' { |sp| } ^spec/specification_spec.rb:404:34: W: ambiguous first argument; parenthesize arguments or add whitespace to the right end.message.should.match /No podspec exists/ ^spec/specification_spec.rb:412:34: W: ambiguous first argument; parenthesize arguments or add whitespace to the right end.message.should.match /Unsupported specification format/ ^spec/specification_spec.rb:439:31: E: unexpected token tLCURLY s.subspec 'Subspec' { |sp| } ^spec/specification_spec.rb:443:34: W: ambiguous first argument; parenthesize arguments or add whitespace to the right end.message.should.match /can be set only for root specs/ ^spec/specification_spec.rb:451:1: E: unexpected token $end1 file inspected, 7 offences detected
An example of the diff:
@spec = Spec.new do |s|
s.name = "Pod"
s.version = "1.0"
- s.subspec 'Subspec' do |sp| end+ s.subspec 'Subspec' { |sp| }
end
@subspec = @spec.subspecs.first
end
I understand that this is not elegant Ruby and that the original file should be changed, but still is valid Ruby and rubocop should not break it (hence why I'm reporting the issue).
The text was updated successfully, but these errors were encountered:
I'm shaping up some specs files and I have disabled all the cops which where detecting an infraction:
I would then expect that the automatic fix would not modify the file, instead it does:
An example of the diff:
I understand that this is not elegant Ruby and that the original file should be changed, but still is valid Ruby and rubocop should not break it (hence why I'm reporting the issue).
The text was updated successfully, but these errors were encountered: