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 =
<<~COPCONTENT Generally we want to avoid setting flippers in code. Flippers should be temporary and used for strategic rollouts, not persistence -- use real databases instead When using flipper in specs, use the with_feature helper describe 'usage' do let(:user) { create(:user)} with_feature(:some_awesome_feature, actor: :user) with_feature(:some_awesome_feature, actor: :user) do it {...} end end COPCONTENT
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 |