Skip to content

eng: loosen rubocop restrictions ECOMM-7882#50

Open
tshedor wants to merge 4 commits intomasterfrom
ECOMM-7882-loosen-restrictions
Open

eng: loosen rubocop restrictions ECOMM-7882#50
tshedor wants to merge 4 commits intomasterfrom
ECOMM-7882-loosen-restrictions

Conversation

@tshedor
Copy link

@tshedor tshedor commented Feb 6, 2026

Inspired by this discussion

8FAX
8FAX previously approved these changes Feb 6, 2026
Max: 20

RSpec/MultipleExpectations:
Enabled: false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is set to false by default right, are we just adding it for clarity that more then 1 expect per it block is wrong?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So by setting this false we are allowing multiple expects per it block?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not in favor of this one but not a huge deal

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rspec doesn't do a good job at letting you know which expectation failed when there are multiple

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with Travis here, I think if we're going to loosen restrictions on application logic, we should still try to maintain the current test restrictions until we have a better idea of how this change actually will affect the code output.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tmyrick @8FAX This is genuinely my least favorite lint and the one I disable the most. But if you're both on board with keeping it I'll remove.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for removing this, I think we may get to a point where this can be removed, but for now I think its helpful. I am more then happy to talk about this later on if we want to move to remove this.

Copy link
Member

@evan-waters evan-waters Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I somewhat agree with the intended purpose of this lint. It prevents you from having hidden failures in a single test, but I do not necessarily agree with it as a style rule. I favor using :aggregate_failures on my test block to get around this lint. The rule allows this without having to ignore.

@danhealy
Copy link
Member

danhealy commented Feb 6, 2026

I'd be disappointed to reduce our code quality targets without data to justify it.

I think if we wanted to avoid bikeshedding, we should consider using https://github.com/standardrb/standard

TheKidCoder
TheKidCoder previously approved these changes Feb 6, 2026
@tshedor tshedor dismissed stale reviews from TheKidCoder and 8FAX via 866fe8e February 6, 2026 19:13
@tshedor tshedor requested review from 8FAX and TheKidCoder February 6, 2026 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

6 participants