summaryrefslogtreecommitdiff
path: root/rubocop
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-09-13 15:12:17 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-09-13 15:12:17 +0000
commit4597f7fe473d9fa622510f8967620006d4bda64e (patch)
treedafe547a51e57112ad92258f4bf992c014591a88 /rubocop
parent37a739daec0d7021b2af6ad03c60d37ac3461d88 (diff)
downloadgitlab-ce-4597f7fe473d9fa622510f8967620006d4bda64e.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'rubocop')
-rw-r--r--rubocop/cop/gitlab/avoid_feature_get.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/rubocop/cop/gitlab/avoid_feature_get.rb b/rubocop/cop/gitlab/avoid_feature_get.rb
index abde1383fca..7664f66521a 100644
--- a/rubocop/cop/gitlab/avoid_feature_get.rb
+++ b/rubocop/cop/gitlab/avoid_feature_get.rb
@@ -9,11 +9,16 @@ module RuboCop
#
# # bad
#
- # Feature.get(:x)
+ # Feature.get(:x).enable
+ # Feature.get(:x).enable_percentage_of_time(100)
+ # Feature.get(:x).remove
#
# # good
#
# stub_feature_flags(x: true)
+ # Feature.enable(:x)
+ # Feature.enable_percentage_of_time(:x, 100)
+ # Feature.remove(:x)
#
class AvoidFeatureGet < RuboCop::Cop::Cop
MSG = 'Use `stub_feature_flags` method instead of `Feature.get`. ' \