Phil Pirozhkov
Phil Pirozhkov
This can be solved by autocorrected code to the last position of previous code, not first. would you like to send a PR, @john-h-k ?
> I should be able to confidently run safe rubocop autocorrects without even checking them > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND I don’t have...
I don’t mean in a legal way. I mean bugs and deficiencies take place, and “should confidently without checking” is an aspiration, but we almost never can make sure. We...
Is the example with using the result of one call as the return value of another realistic?
What if there’s just one? Should be some threshold for the suggestion to extract?
@januszm Pull request is welcome! cc @itay-grudev I imagine you'd have to tweak this logic https://github.com/rubocop-hq/rubocop-rspec/blob/master/lib/rubocop/cop/rspec/cop.rb#L43 or maybe take a look at the other RuboCop extensions how they manage to...
``` /Users/pirj/source/real-world-rspec/sharetribe/spec/services/util_spec.rb:44:1: C: RSpec/MultipleTestTargetsPerSpecFile: Spec files should only include one test target object. describe StringUtils do ^^^^^^^^^^^^^^^^^^^^ /Users/pirj/source/real-world-rspec/sharetribe/spec/services/util_spec.rb:66:1: C: RSpec/MultipleTestTargetsPerSpecFile: Spec files should only include one test target object. describe...
RSpec would warn for negation https://github.com/rspec/rspec-expectations/blob/2e8e800a0d8b64e7168dd625efe8f7526b7f1262/lib/rspec/matchers/built_in/raise_error.rb#L156 And it does a better job in runtime that we can with static analysis, eg for the mistakenly passed `nil` argument. It’s also good...
Why? It could be /get_users_spec.rb as per request_descriptor naming schema, even with [dynamic parts](http://rspec.info/features/6-1/rspec-rails/request-specs/request-spec/). Or /widget_management_spec.rb if you follow the example naming from rspec-rails examples http://rspec.info/features/6-1/rspec-rails/request-specs/request-spec/ I like it more...
Or the cop should not auto-correct top-level groups. Thanks for reporting!