Skip to content

Cop idea: Rails/Env #1376

Open
Open
@cdudas17

Description

@cdudas17

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions