diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-13 06:08:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-13 06:08:09 +0300 |
commit | e44c47168ab82d5ec1d945da7c33c2da5996e267 (patch) | |
tree | c55a881ad5ffe70b69400aa0620d0559319b3a35 /rubocop | |
parent | df4e4c33e0266171016df38c0a41e8c049ee114f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'rubocop')
-rw-r--r-- | rubocop/cop/gitlab/mark_used_feature_flags.rb | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/rubocop/cop/gitlab/mark_used_feature_flags.rb b/rubocop/cop/gitlab/mark_used_feature_flags.rb index ffd59c8fffc..f466ab87aa0 100644 --- a/rubocop/cop/gitlab/mark_used_feature_flags.rb +++ b/rubocop/cop/gitlab/mark_used_feature_flags.rb @@ -32,12 +32,6 @@ module RuboCop RESTRICT_ON_SEND = FEATURE_METHODS + SELF_METHODS - USAGE_DATA_COUNTERS_EVENTS_YAML_GLOBS = [ - File.expand_path("../../../config/metrics/aggregates/*.yml", __dir__), - File.expand_path("../../../lib/gitlab/usage_data_counters/known_events/*.yml", __dir__), - File.expand_path("../../../ee/lib/ee/gitlab/usage_data_counters/known_events/*.yml", __dir__) - ].freeze - class << self # We track feature flags in `on_new_investigation` only once per # rubocop whole run instead once per file. @@ -52,8 +46,6 @@ module RuboCop return if self.class.feature_flags_already_tracked self.class.feature_flags_already_tracked = true - - track_usage_data_counters_known_events! end def on_casgn(node) @@ -184,22 +176,6 @@ module RuboCop feature_method?(node) || self_method?(node) end - # Marking all event's feature flags as used as Gitlab::UsageDataCounters::HLLRedisCounter.track_event{,context} - # is mostly used with dynamic event name. - def track_usage_data_counters_known_events! - usage_data_counters_known_event_feature_flags.each { |feature_flag_name| save_used_feature_flag(feature_flag_name) } - end - - def usage_data_counters_known_event_feature_flags - USAGE_DATA_COUNTERS_EVENTS_YAML_GLOBS.each_with_object(Set.new) do |glob, memo| - Dir.glob(glob).each do |path| - YAML.safe_load(File.read(path))&.each do |hash| - memo << hash['feature_flag'] if hash['feature_flag'] - end - end - end - end - def defined_feature_flags @defined_feature_flags ||= begin flags_paths = [ |