diff --git a/lib/rubocop/cop/lint/redundant_cop_disable_directive.rb b/lib/rubocop/cop/lint/redundant_cop_disable_directive.rb index 0e122a38e48..872da67c3c5 100644 --- a/lib/rubocop/cop/lint/redundant_cop_disable_directive.rb +++ b/lib/rubocop/cop/lint/redundant_cop_disable_directive.rb @@ -135,7 +135,7 @@ def each_already_disabled(line_ranges, disabled_ranges, comments) end end - # rubocop:todo Metrics/AbcSize, Metrics/CyclomaticComplexity + # rubocop:todo Metrics/CyclomaticComplexity def find_redundant(comment, offenses, cop, line_range, next_line_range) if all_disabled?(comment) # If there's a disable all comment followed by a comment @@ -153,7 +153,7 @@ def find_redundant(comment, offenses, cop, line_range, next_line_range) cop if cop_offenses.none? { |o| line_range.cover?(o.line) } end end - # rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity + # rubocop:enable Metrics/CyclomaticComplexity def all_disabled?(comment) /rubocop\s*:\s*(?:disable|todo)\s+all\b/.match?(comment.text)