-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Style/NestedParenthesizedCalls rspec whitelist is non-exhaustive #2976
Comments
There are a lot of matchers which are missing in the list (eg. |
I agree in principle, but by including some rspec matchers, it seems rubocop is somewhat dependent on rspec already, but still produces inconsistent behavior depending on which rspec matchers you're using. Yes, you can just disable the cop if you run into that issue, but I feel that you're sweeping the problem under the rug at that point. Perhaps it's better to remove any rspec dependent logic from the core of rubocop, and put that logic in an rspec-specific cop, e.g. Rubocop-Rspec. |
Why do you think that is RuboCop dependent on rspec? Probably it'd be best to drop this functionality and just leave it to people to configure the cop. Hardcoded config is bad, but the option to add/alter config is great. |
Maybe "dependent" isn't exactly the word, but the correctness of this cop relies on the current state of Rspec. I agree though, having some ability to configure this whitelist would be super helpful. |
…tedParenthesizedCalls` cop This cop was using hard coded RSpec methods for whitelisting. This change moves the whitelist into a configuration option.
RuboCop triggers a violation on some rspec methods that are left out of the list of rspec matchers. In my case, this specifically occurs with
be_an
:The text was updated successfully, but these errors were encountered: