Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-10-04 15:17:55 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-10-04 15:17:55 +0300
commit49d36ce6e3484aea8131dd892a02f8304ee61aa1 (patch)
treeee7d8403c0ebacf5b5953ebbf1a838dd957eac6b /rubocop
parentb68afda3299d372ef0b3745e0603a9d51369650b (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'rubocop')
-rw-r--r--rubocop/check_graceful_task.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/rubocop/check_graceful_task.rb b/rubocop/check_graceful_task.rb
index 7bf678def83..d16d3d315bf 100644
--- a/rubocop/check_graceful_task.rb
+++ b/rubocop/check_graceful_task.rb
@@ -15,17 +15,14 @@ module RuboCop
--format RuboCop::Formatter::GracefulFormatter
]
- available_cops = RuboCop::Cop::Registry.global.to_h
-
- cop_names, paths = args.partition { available_cops.key?(_1) }
+ # Convert from Rake::TaskArguments into an Array to make `any?` work as expected.
+ cop_names = args.to_a
if cop_names.any?
list = cop_names.sort.join(',')
options.concat ['--only', list]
end
- options.concat(paths)
-
puts <<~MSG
Running RuboCop in graceful mode:
rubocop #{options.join(' ')}