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 'rubocop/cop_todo.rb')
-rw-r--r--rubocop/cop_todo.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/rubocop/cop_todo.rb b/rubocop/cop_todo.rb
index 42e2f9fbe13..a36afc08673 100644
--- a/rubocop/cop_todo.rb
+++ b/rubocop/cop_todo.rb
@@ -1,8 +1,10 @@
# frozen_string_literal: true
+require_relative 'formatter/graceful_formatter'
+
module RuboCop
class CopTodo
- attr_accessor :previously_disabled
+ attr_accessor :previously_disabled, :grace_period
attr_reader :cop_name, :files, :offense_count
@@ -12,6 +14,7 @@ module RuboCop
@offense_count = 0
@cop_class = self.class.find_cop_by_name(cop_name)
@previously_disabled = false
+ @grace_period = false
end
def record(file, offense_count)
@@ -35,6 +38,7 @@ module RuboCop
yaml << ' Enabled: false'
end
+ yaml << " #{RuboCop::Formatter::GracefulFormatter.grace_period_key_value}" if grace_period
yaml << ' Exclude:'
yaml.concat files.sort.map { |file| " - '#{file}'" }
yaml << ''