From 1523e6ec743d09af0e8a86a7fbc93eabb27d7dbc Mon Sep 17 00:00:00 2001 From: Marc-Andre Lafortune Date: Thu, 30 Jul 2020 11:23:20 -0400 Subject: [PATCH] Remove redundant todo. Not caught because it self excludes... --- lib/rubocop/cop/lint/redundant_cop_disable_directive.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)