diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-20 02:18:09 +0300 |
commit | 6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch) | |
tree | dc4d20fe6064752c0bd323187252c77e0a89144b /rubocop/cop_todo.rb | |
parent | 9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff) |
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'rubocop/cop_todo.rb')
-rw-r--r-- | rubocop/cop_todo.rb | 6 |
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 << '' |