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

Cop idea: Rails/Env #1376

Open
cdudas17 opened this issue Oct 10, 2024 · 0 comments · May be fixed by #1375
Open

Cop idea: Rails/Env #1376

cdudas17 opened this issue Oct 10, 2024 · 0 comments · May be fixed by #1375

Comments

@cdudas17
Copy link

cdudas17 commented Oct 10, 2024

Is your feature request related to a problem? Please describe.

A problem that large Rails applications have is consistent behaviour across environments. Many application maintainers choose to solve this by using feature flags instead of environment flags for particular code behaviour.

Describe the solution you'd like

Instead of relying on env.production? or some environment in an application, we should push the dependency into an environmental config and rely on a feature flag mechanism. like if Feature.active? ... by detecting it with a Rubocop rule

Additional context

This is a custom Rubocop rule that we have ran in production for many years and is part of our initiative to open source and contribute some of our rules upstream

Fans of the 12 factor app design philosophy will find this particularly useful.

@cdudas17 cdudas17 linked a pull request Oct 10, 2024 that will close this issue
9 tasks
cdudas17 added a commit to cdudas17/rubocop-rails that referenced this issue Oct 10, 2024
cdudas17 added a commit to cdudas17/rubocop-rails that referenced this issue Oct 15, 2024
cdudas17 added a commit to cdudas17/rubocop-rails that referenced this issue Oct 15, 2024
cdudas17 added a commit to cdudas17/rubocop-rails that referenced this issue Oct 21, 2024
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

Successfully merging a pull request may close this issue.

1 participant