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:
Diffstat (limited to 'lib/tasks/rubocop.rake')
-rw-r--r--lib/tasks/rubocop.rake13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/tasks/rubocop.rake b/lib/tasks/rubocop.rake
index e993035aa65..0c257585bd0 100644
--- a/lib/tasks/rubocop.rake
+++ b/lib/tasks/rubocop.rake
@@ -6,6 +6,19 @@ unless Rails.env.production?
RuboCop::RakeTask.new
namespace :rubocop do
+ namespace :check do
+ desc 'Run RuboCop check gracefully'
+ task :graceful do |_task, args|
+ require_relative '../../rubocop/check_graceful_task'
+
+ # Don't reveal TODOs in this run.
+ ENV.delete('REVEAL_RUBOCOP_TODO')
+
+ result = RuboCop::CheckGracefulTask.new($stdout).run(args.extras)
+ exit result if result.nonzero?
+ end
+ end
+
namespace :todo do
desc 'Generate RuboCop todos'
task :generate do |_task, args|