-
-
Notifications
You must be signed in to change notification settings - Fork 277
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
Consider enabling some of the pending cops #1886
Comments
IMO, basically, I think there is no problem with all pending cops change to enable. However, we should consider disabling it if there are many people who want to disable it due to Issues. |
The only case I can justify for myself to disable a cop is if it’s extremely buggy. If it’s just buggy, we should fix it (or, better help our contributors fix it). I’m against marking cops as unsafe or unsafe for autocorrection if they are buggy. This is a an example of good cops going on retirement effectively (because nobody runs -A) just because of a bug that noone committed to fixing. My suggestion:
We’ll have feedback from a wider audience than previously (our early adopters with NewCops: true), might be a lot to handle. But we don’t force anyone to upgrade to the new major version, and we’ll have time to release bugfix 3.0.x versions. The very purpose of releasing a major version is to enable all pending cops, and bravely get all the feedback. |
Of the currently pending cops, it’s only
As for
I’m fine with people using |
We have MatchArray (that pushes towards contains_exactly), and ContainExactly (that pushes for match_array usage), but they are not mutually exclusive, are they? We can see how they play together, and adjust accordingly if they clash? |
I have no problem with the MatchArray cop; all the corrections it told me to do were spot on. I just don’t see the value in the ContainExactly cop telling me to change from expect(foo).to contain_exactly(*arr_a, *arr_b) to expect(foo).to match_array(arr_a + arr_b) Some of the corrections are fine with me though, e.g. when splatting a literal array: |
I think this goes in line with the recent additions to rubocop-performance which started recommending arr1 + arr2 instead of [*arr1, *arr2]. I have no idea why, just can guess that because of performance. Speaking of the other example, can’t it just be |
Actually, But if we ignore that for a second, then |
So, should we just mark |
I believe so |
No description provided.
The text was updated successfully, but these errors were encountered: