Class: RuboCop::Cop::Bugcrowd::FlipperInAppCode
- Inherits:
-
Cop
- Object
- Cop
- RuboCop::Cop::Bugcrowd::FlipperInAppCode
- Defined in:
- lib/rubocop/cop/bugcrowd/flipper_in_app_code.rb
Constant Summary collapse
- MSG =
"Generally we want to avoid setting flippers in code.\nFlippers should be temporary and used for strategic rollouts, not persistence -- use real databases instead\n\nWhen using flipper in specs, use the with_feature helper\n\ndescribe 'usage' do\n let(:user) { create(:user)}\n with_feature(:some_awesome_feature, actor: :user)\n with_feature(:some_awesome_feature, actor: :user) do\n it {...}\n end\nend\n"
Instance Method Summary collapse
Instance Method Details
#on_send(node) ⇒ Object
26 27 28 29 30 |
# File 'lib/rubocop/cop/bugcrowd/flipper_in_app_code.rb', line 26 def on_send(node) return unless flipper_enable?(node) add_offense(node) end |