From 2e7b87ce547151b13accf12186234821d3273942 Mon Sep 17 00:00:00 2001 From: Peter Leitzen Date: Mon, 2 May 2022 14:23:28 +0200 Subject: [PATCH] Disable remaining RuboCop offense for Performance/AncestorsInclude This is a false positive since we are implementing `ancestors` ourselves with different semantics. --- .rubocop_todo.yml | 6 ------ lib/gitlab/ci/config/extendable/entry.rb | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index b3207c1923fc5a..f3fe41bc40f70f 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -23,12 +23,6 @@ Lint/UselessMethodDefinition: Naming/RescuedExceptionsVariableName: Enabled: false -# Offense count: 1 -# Cop supports --auto-correct. -Performance/AncestorsInclude: - Exclude: - - 'lib/gitlab/ci/config/extendable/entry.rb' - # Offense count: 29 # Configuration parameters: MinSize. Performance/CollectionLiteralInLoop: diff --git a/lib/gitlab/ci/config/extendable/entry.rb b/lib/gitlab/ci/config/extendable/entry.rb index 0001a259281fdb..169d329fe023cd 100644 --- a/lib/gitlab/ci/config/extendable/entry.rb +++ b/lib/gitlab/ci/config/extendable/entry.rb @@ -99,7 +99,7 @@ def nesting_too_deep? end def circular_dependency? - ancestors.include?(key) + ancestors.include?(key) # rubocop:disable Performance/AncestorsInclude end def unknown_extensions -- GitLab