Enable RSpec/ReceiveCounts and RSpec/ContextMethod cops
Description of the proposal
In the upgrade to gitlab-styles 3.1.0
a series of new cops were disabled because of violations. This MR re-enables RSpec/ReceiveCounts
and RSpec/ContextMethod
cops while ignoring current codebase violations. Current codebase violations will be addressed in #198581 (closed)
-
RSpec/ReceiveCounts
- https://www.rubydoc.info/gems/rubocop-rspec/1.37.0/RuboCop/Cop/RSpec/ReceiveCounts -
RSpec/ContextMethod
- https://www.rubydoc.info/gems/rubocop-rspec/1.37.0/RuboCop/Cop/RSpec/ContextMethod
Check-list
-
Make sure this MR enables a static analysis check rule for new usage but ignores current offenses -
Create a follow-up issue to fix the current offenses as a separate iteration: #198581 (closed) -
Mention this proposal in the relevant Slack channels (e.g. #development
,#backend
,#frontend
) -
If there is a choice to make between two potential styles, set up an emoji vote in the MR: - CHOICE_A:
🅰 - CHOICE_B:
🅱 - Vote yourself for both choices so that people know these are the choices
- CHOICE_A:
-
The MR doesn't have significant objections, and is getting a majority of 👍 vs👎 (remember that we don't need to reach a consensus) -
(If applicable) One style is getting a majority of vote (compared to the other choice) -
(If applicable) Update the MR with the chosen style -
Follow the review process as usual -
Once approved and merged by a maintainer, mention it again: -
In the relevant Slack channels (e.g. #development
,#backend
,#frontend
) -
(Optional depending on the impact of the change) In the Engineering Week in Review
-
Edited by 🤖 GitLab Bot 🤖