Skip to content
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

Disable ConsistentParenthesesStyle by default: redundant with Style/ config #132

Closed
thejonroberts opened this issue Oct 4, 2024 · 2 comments

Comments

@thejonroberts
Copy link
Contributor

thejonroberts commented Oct 4, 2024

This is marked as a 'pending' rule, so I'm not 100% this will be enabled by default, but that seems to be the case more often than not with rubocop plugins.

Unless I'm missing some gotcha, FactoryBot method calls are... just method calls! I would prefer letting the base Rubocop configuration govern the styles for ALL method calls. The methods can be used in many different contexts, as illustrated by #84 and #15 . I think the most reasonable default is to not enforce parens vs. no-parens.

Enforcing one style by default also increases the pain of installing the gem in an existing project. I recently added rubocop-factory_bot to a project, and this was the only rule that needed configuration. Otherwise I'm very happy with the experience, it was worth it!

I appreciate that some people want to treat these methods one way or the other consistently. I just think the rule should be opt-in.

@pirj
Copy link
Member

pirj commented Nov 19, 2024

Cops are pending until the next major release.

according to this Ruby style guide guideline, opposed style may apply, and this is why we have special case cop for FactoryBot DSL.

Thanks for sharing, and for the warm words! You’re always welcome.

@pirj pirj closed this as not planned Won't fix, can't repro, duplicate, stale Nov 19, 2024
@thejonroberts
Copy link
Contributor Author

Ah, I can accept the DSL style as a legitimate reason for the rule (and as default). I disagree, but can configure as I see fit. Thanks for the explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants