diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 12:07:21 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 12:07:21 +0000 |
commit | ef58231bd6702495b8d2d1e7ddc2ad66d1a7dc70 (patch) | |
tree | 49d44d81aa99c000e78e692bca18fdcaa134673a /rubocop | |
parent | 0a921554d8c33ccbbd1f2edcee8cd70a0ecfd1a2 (diff) | |
download | gitlab-ce-ef58231bd6702495b8d2d1e7ddc2ad66d1a7dc70.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'rubocop')
-rw-r--r-- | rubocop/cop/avoid_return_from_blocks.rb | 2 | ||||
-rw-r--r-- | rubocop/cop/gitlab/mark_used_feature_flags.rb | 2 | ||||
-rw-r--r-- | rubocop/rubocop.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/rubocop/cop/avoid_return_from_blocks.rb b/rubocop/cop/avoid_return_from_blocks.rb index 61edfd0a789..c6a7a87c548 100644 --- a/rubocop/cop/avoid_return_from_blocks.rb +++ b/rubocop/cop/avoid_return_from_blocks.rb @@ -32,7 +32,7 @@ module RuboCop return unless top_block?(node) block_body.each_node(:return) do |return_node| - next if parent_blocks(node, return_node).all?(&method(:whitelisted?)) + next if parent_blocks(node, return_node).all? { |block_node| whitelisted?(block_node) } add_offense(return_node) end diff --git a/rubocop/cop/gitlab/mark_used_feature_flags.rb b/rubocop/cop/gitlab/mark_used_feature_flags.rb index d1722a47c8a..ffd59c8fffc 100644 --- a/rubocop/cop/gitlab/mark_used_feature_flags.rb +++ b/rubocop/cop/gitlab/mark_used_feature_flags.rb @@ -187,7 +187,7 @@ module RuboCop # 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(&method(:save_used_feature_flag)) + 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 diff --git a/rubocop/rubocop.rb b/rubocop/rubocop.rb index 6b5491b27fc..c17ecf054ce 100644 --- a/rubocop/rubocop.rb +++ b/rubocop/rubocop.rb @@ -7,6 +7,6 @@ require_relative 'ext/path_util' require_relative 'ext/variable_force' # Auto-require all cops under `rubocop/cop/**/*.rb` -Dir[File.join(__dir__, 'cop', '**', '*.rb')].sort.each(&method(:require)) +Dir[File.join(__dir__, 'cop', '**', '*.rb')].sort.each { |file| require file } # rubocop:enable Naming/FileName |